Difference between Bin/Debug and Bin/Release

断了今生、忘了曾经 提交于 2019-12-23 02:28:43

问题


I using a sql-server compact database within a c# winform project.

If I look at the files that make up the solution I can see a copy of the exe and the sdf file in both of the following folders:

  1. /bin/Debug/
  2. /bin/Release/

If I double-click and exe in 1. then it updates the sdf in 1. and likewise for the exe/sdf in 2.

When I open VS I assume I'm playing around with the files in 1. ?

When do the files in 2. get overwritten ?

When I publish the project using a Click-Once install which files are being used to create the .application file ?

ADDITION

The generic post above hasn't solved my problem but it has somewhat confused things further. Here is the specific scenario which I was hoping answers to the above would solve:

The development Solution folder is saved on a USB pen drive. This Solution includes a database file. I have publish to my home PC I have published to my work PC. I'm happy carrying the pen drive around and plugging in to either PC. How do I set things up so that if I update the database only one version of the data exists?

I've changed the solution to Expert Settings and exposed the configuration manager - can this help?:


回答1:


What is the difference between Debug and Release in Visual Studio? http://msdn.microsoft.com/en-us/library/kkz9kefa(v=vs.110).aspx

those are two diffrent configurations of the project.

and those are built into diffrent folders

the clikc once files are probably based on what is the current ACTIVE CONFIGURATION




回答2:


It depends on the project's configuration, if you're in debug mode you're using the debug one




回答3:


To see your active configuration:

Click on the "Build" tab, and then click "Configuration Manager".

You can also do this if you have a brand new recently installed VS Express:

  1. Tools ⇒ Settings ⇒ Expert Settings.
  2. Tools ⇒ Option ⇒ check "show all settings" at bottom left corner.
  3. Tools ⇒ Options ⇒ Projects and Solutions ⇒ General ⇒ "Show advanced build configurations".


来源:https://stackoverflow.com/questions/11600162/difference-between-bin-debug-and-bin-release

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!