change build of myClassLib to Release instead of Debug?

R

Rich P

I created a class library (dll) in "Active Debug" mode. After testing
it out and seeing it works correctly I went to the Properties page of my
Project to the Build section and changed the configuration to "Release"
from "Active Debug". The Output Path says "bin\Release\"

But when I click on Build myClassLib -- it is still building it in
bin\Debug. How do I change this to bin\Release\?

Thanks

Rich
 
P

Peter Duniho

Rich said:
I created a class library (dll) in "Active Debug" mode. After testing
it out and seeing it works correctly I went to the Properties page of my
Project to the Build section and changed the configuration to "Release"
from "Active Debug". The Output Path says "bin\Release\"

But when I click on Build myClassLib -- it is still building it in
bin\Debug. How do I change this to bin\Release\?

The selection you found in the Properties doesn't change what's being
output when you build the solution. It changes the settings for _that_
configuration, so that when you _do_ build that configuration, it uses
those settings.

When you selected a different configuration ("Release") in the
Properties for the project, that didn't change anything in the project
itself. It just changes the state of the Properties window, so that you
can modify properties for the "Release" build instead of the active
"Debug" build.

To change what configuration is actually being built, either find the
toolbar drop down that has the list of configurations in it, and select
"Release" instead of "Debug". Or use the Build/Configuration Manager…
menu item, which will bring up the Configuration Manager dialog. The
first thing, in the upper left corner, is the currently selected
"active" configuration.

Note that if you simply want to build everything, you can use the
Build/Batch Build… menu item to bring up a dialog that will let you
select the configurations to build all at once. Ensure that the
"Release" build is selected in that dialog, then click the "Build"
button, and it and every other configuration you've selected in that
dialog will be built.

Note also that the build configuration is a solution-wide setting. All
projects in the solution will be built using the selected setting,
unless you go through the Batch Build dialog (which allows you to select
individual projects/configuration combinations to be built).

Pete
 
R

Rich P

Thank you for your reply. I am using VS2008, but I can't find the
configuration manager. It was easy to find in VS2003 (and I think
VS2005). Where is it in VS2008?

Rich
 
R

Rich P

Nevermind. I found it. It was listed in the dropdown window that says
Debug on the main toolbar underneath the Build/Debug/Data menus. Now
all is well :).

Rich
 
K

Konrad Neitzel

Hi Rich!

Rich P said:
Thank you for your reply. I am using VS2008, but I can't find the
configuration manager. It was easy to find in VS2003 (and I think
VS2005). Where is it in VS2008?

It is inside the Build Menu.

Build -> Configuration Manager ...

Konrad
 
R

RayLopez99

Note also that the build configuration is a solution-wide setting.  All
projects in the solution will be built using the selected setting,
unless you go through the Batch Build dialog (which allows you to select
individual projects/configuration combinations to be built).

Thanks, that's nice to know.

But if you read between the lines of this blog, there's not much
difference at all between Release and Debug, other than size, and in
fact if you read the user's comments to the blog (which may be
mistaken)-- http://dotnetthoughts.wordpress.com/2007/11/29/debug-and-release-builds/
-- Release mode actually makes certain conversions from char slightly
incorrect, see below.

RL



*
Do you know if the “Release mode” treats numbers differently from the
“Debug mode”?

I have to do a conversion from char* to double and it does it
correctly in the “Debug mode” but incorrectly in the “Release mode”..

Example:
– Debug: 9.0377972222222
– Release: 9.0397277777778

Santi24 needs help! Please!

Comment by Santi24 — November 27, 2008 @ 4:27 am
 
R

RayLopez99

But if you read between the lines of this blog, there's not much
difference at all between Release and Debug, other than size, and in
fact if you read the user's comments to the blog (which may be
mistaken)--http://dotnetthoughts.wordpress.com/2007/11/29/debug-and-release-builds/
-- Release mode actually makes certain conversions from char slightly
incorrect, see below.

Correction: I just checked a complex WPF application I wrote and it
Release mode it was 9% faster than Debug mode to execute a certain
complicated loop, so there are advantages to Release mode.

RL
 
R

RayLopez99

Correction:  I just checked a complex WPF application I wrote and it
Release mode it was 9% faster than Debug mode to execute a certain
complicated loop, so there are advantages to Release mode.

Correction to the corrections: I ran a series of tests and over time,
Release mode for this complex program was about 6% faster. So Release
is better than Debug for speed, but not dramatically (2x etc).

RL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top