Confused about Release/Debug folders in Visual Studio 2010

Viewed 11516

I am working on ASP.Net MVC 3. When I build it in debug mode, all files go to the bin folder. But I have seen people with "Debug" & "Release" folders inside the bin folder. Why don't I have that in my bin folder?

How do I have Debug & Release folders in my bin folder? Or should I really have them?

Then I saw that there are Debug & Release folders inside \obj\ folder created when using "Deployment Wizard". What is the different between these folders and the ones under "bin" folder? Are these both same?

Please help.

4 Answers

Try to do the following steps:

Step I.

  1. Right click on a web project name in a solution explorer and choose "Publish"
  2. Inside a "Pick a publish target" select "Folder"
  3. Make sure you have "bin\Release\" in a "Folder or File Share" right pan
  4. Click on "Create Profile" button in a bottom right corner of the popup
  5. In opened window click on "Rename Profile" blue link
  6. Set "Release" in a "New Profile Name" input box

Step II.

  1. Once again right click on a web project name in a solution explorer and choose "Publish"
  2. Click on "Create new profile" blue link
  3. Inside a "Pick a publish target" select "Folder"
  4. Make sure you have "bin\Debug\" in a "Folder or File Share" right pan
  5. Click on "Create Profile" button in a bottom right corner of the popup
  6. In opened window click on "Settings" blue link
  7. In an opened "Publish" popup inside a left menu choose "Settings"
  8. Set "Debug" in a "Configuration" drop down list
  9. Click on "Save" button
  10. Click on "Rename Profile" blue link
  11. Set "Debug" in a "New Profile Name" input box
  12. Click on "Save" button

As a result you will have 2 profiles for publishing that you can specify in a drop down list before publishing. You can also create as many profiles as you need.

Final Step.

Try to play with it consistently changing profiles, then clicking on a "Publish" button and checking your specified output folders:

  • bin/Debug/
  • bin/Release/

If you make everything correctly you will have specific Web.config files inside each folder.

Related