问题
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:
/bin/Debug/
/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:
- Tools ⇒ Settings ⇒ Expert Settings.
- Tools ⇒ Option ⇒ check "show all settings" at bottom left corner.
- Tools ⇒ Options ⇒ Projects and Solutions ⇒ General ⇒ "Show advanced build configurations".
来源:https://stackoverflow.com/questions/11600162/difference-between-bin-debug-and-bin-release