C # why is App.config copied to my debug and release folder after build?

I am using Visual Studio 2008 professional, C #. I found that the App.config copied to the bin \ debug and bin \ release folder. Is this the default? I thought the file XXX.exe.config would be the only configuration file for the project.

  • Is it safe to release our application without App.config ?
  • if so, how to ask VS2008 to stop copying this file after assembly?

thanks

+6
c #
source share
1 answer

Since .Net will look for a configuration file with a name after your executable, it is safe to release the application without "App.Config".

To stop VS-copying the configuration file to the bin directory, select App.config in the solution explorer, show Properties for the file, then change the "Copy to output directory" option to "Do not copy".

+7
source share

All Articles