How to automatically include the release version of libraries

B

Beorne

I'm using visual studio 2005.
My main project contains some included class libraries.
I have included tin the main project references the various bin\debug
\lib.dll files.
Now I want to try a release configuration but the main project
continues to include the \debug version of the libraries (that, now,
are correctly compiled in release configuration too).
Should I manually change all the references every time I change
configuration?

Thanks,
Matteo.
 
M

miher

Hi,

If You have the referenced projects in the same solution, replace Your
references to the dll-s with references to the projects, so the required
configuration gets included.

In case You have the dlls from elsewhere You can try to modify the project
file by hand.
- Unload the given project and open it for edit.
- Look for the references itemgroup, You will find elements like :
<Reference Include=...
- these reference tags can have a Condition property,
- set Condition to "'$(Configuration)' == 'Debug'" for debug dlls and
"'$(Configuration)' == 'Release' for release dlls
- Save and reload Your project
Latter solution requires some work, if You find better way please let me
know.

-Zsolt
 
B

Beorne

Hi,

If You have the referenced projects in the same solution, replace Your
references to the dll-s with references to the projects, so the required
configuration gets included.

Thank you very much, the simple solution does work.
 

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