Reputation: 6849
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.
Upvotes: 7
Views: 12069
Reputation: 620
Try to do the following steps:
Step I.
Step II.
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:
If you make everything correctly you will have specific Web.config files inside each folder.
Upvotes: 1
Reputation: 2094
Here is a good thread for what the /obj folder is for and how it's different from the /bin folder
As for why you don't have Debug/Release folders in your /bin folder:
-Under your project properties go to the Build tab
-From the Configuration on top choose Debug or Release
-For each configuration you can set the Output Path at the bottom of the window. For Debug use bin\Debug and do the same for Release.
I'm not sure why VS doesn't do this automatically -- it did it for my other projects in the same solution.
Upvotes: 6
Reputation: 14955
Release Mode
When an assembly is built in release mode, the compiler performs all available optimisations to ensure that the outputted executables and libraries execute as efficiently as possible. This mode should be used for completed and tested software that is to be released to end-users. The drawback of release mode is that whilst the generated code is usually faster and smaller, it is not accessible to debugging tools.
Debug Mode
Debug mode is used whilst developing software. When an assembly is compiled in debug mode, additional symbolic information is embedded and the code is not optimised. This means that the output of the compiler is generally larger, slower and less efficient. However, a debugger can be attached to the running program to allow the code to be stepped through whilst monitoring the values of internal variables.
Some excellent SO threads about this is here and here
Upvotes: 5
Reputation: 2158
I think When you make a desktop application then your Debug and Release folder create in Bin folder,And in web applications debug and release folder is not in bin folder.
The difference between the debug and release folder is, Debug mode : Help you in debugging like line no etc.No optimized while Release mode : It is optimized and efficient because all debug information is removed.
Upvotes: 0