开发者

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

I am 开发者_开发问答using Visual Studio 2008 professional, C#. I found the App.config file is copied into the bin\debug and bin\release folder. Is that by default? I thought the XXX.exe.config file will be the only configuration file for a project.

  1. Is it safe to release our applicaion without the App.config?
  2. if yes, how to ask VS2008 to stop copy that file after build?

thanks


Since .Net will be looking for a config file named after your executable, it is safe to release the application without "App.Config".

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜