Reputation: 10233
Whenever I open a new (web) project in VS 2010 the default build configuration is set to "Active (Debug)". I read somewhere that if I upload my project like this to the server it would have a slight affect on performance (is this true?), so I have to manually go to properties and change it in the build tab to release. Is there any way to tell VS 2010 to open every new project in 'release' configuration?
Upvotes: 5
Views: 9300
Reputation: 881
Open the .csproj
file of that project and search if you have this line (typically at the beginning):
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
This line sets the Debug configuration if it's not set yet. You can replace Debug with Release
Upvotes: 0
Reputation: 34369
You would be better off performing a Publish operation when you want to deploy, as this will not only build in Release (or any configuration you wish), but also will only produce the files that are required by the application. You can publish to a local folder to then upload to a remote server.
Upvotes: 0
Reputation: 78458
I believe the build configurations are listed alphabetically, and the first one is always selected when starting a new project.
Since Debug and Release configurations are always added by default, you'll always get Debug selected unfortunately.
Upvotes: 5
Reputation: 611
Yes, it is true that dll's built in debug mode will not perform as efficiently as dll's built in release mode. A debug mode build includes symbols to allow you to attach a debugger to the dll while it is running. The result of this is slightly larger, less performant set of libraries. However, unless you are doing some really intense mathmatical processing, you probably wouldn't notice the performance loss.
Release mode on the other hand will produce smaller, more efficient dll's but you won't be able to attach an external debugger once you have deployed your application.
I would recommend you leave your applications in debug mode while in development/test, and then before deploying to production, switch to release mode.
UPDATE: I now realize I didn't answer your original question but hopefully you find the advice useful.
Upvotes: -1