2

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?:

enter image description here

whytheq
  • 34,466
  • 65
  • 172
  • 267

3 Answers3

3

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

Community
  • 1
  • 1
Nahum
  • 6,959
  • 12
  • 48
  • 69
  • +1 i've not amended the active configuration at all i.e it must be whatever the default is - how do I find the settings for thios configuration? – whytheq Jul 22 '12 at 13:41
2

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

Johnny Pauling
  • 12,701
  • 18
  • 65
  • 108
  • but when I publish the project - without having amended any of the project's confirguration - which of these is being used; the version in Debug or the version in Release ? – whytheq Jul 22 '12 at 13:45
1

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".
Carlos
  • 5
  • 1
  • 6
ispiro
  • 26,556
  • 38
  • 136
  • 291
  • Tools -> Settings -> Expert Settings. ... this just seems to switch the settings from Basic to Expert but doesn't help answer my question. I'm using VS Express so there is no Configuration Manager in the Build tab .. correcttion > there is no Build tab – whytheq Jul 22 '12 at 15:11
  • Sorry. I use expert settings, so I didn't notice that. Show the expert settings as I've explained - then you'll see the "Build" tab. Even in the Express version. – ispiro Jul 22 '12 at 15:16
  • I think you'll also see in one of the toolbars - a textbox with the current build. But maybe I added that later. – ispiro Jul 22 '12 at 15:17
  • ok - changing to Expert settings has exposed the Build menu; but no option in that menu for Config Manager – whytheq Jul 22 '12 at 15:45
  • At the bottom of the Project menu is an option for "Properties ..." - maybe that is what I need. It has tabs down the left hand side for Publish / Build etc – whytheq Jul 22 '12 at 15:48
  • Nope. What do you have in the "Build"? You're supposed to have: Build , Rebuild , Publish , and Configuration manager. – ispiro Jul 22 '12 at 15:50
  • nope. Just three options: Build Solution / Rebuild Solution / Publish – whytheq Jul 22 '12 at 15:54
  • See http://stackoverflow.com/questions/1460459/visual-studio-configuration-manager-missing . You'll have to "check" the little box at the bottom left of the "options" menu ("show all settings") in order to see the "Projects and Solutions". – ispiro Jul 22 '12 at 15:56
  • i wonder if it is because I've manually added a file App.config to this particular project ? – whytheq Jul 22 '12 at 15:59
  • Now I have this menu let me add the full scenario to my OP as this menu might be a help – whytheq Jul 22 '12 at 16:02