How to fix hardcoded references to 'debug code' in Release

G

Guest

Problem:
In 'solution A', 'project 1' references 'project 2'. As such, when 'solution A' is built (debug mode), project '1' creates a dll in /debug, and project '2' referneces that dll. All is good. When 'solution A' is built in release mode however, 'project 1' is recompiled and the new dll is put into '/release', but 'project 2' still references the dll from project '1's /debug folder, and as such is compiled using the older /debug version of 'project 1's dll.

How do I get around the 'hardcoded' aspect of referencing another project in a solution (and by hard-coding, I mean that dotnet seems to hard-code a reference to another project the whatever version of the dll (/debug or /release) you first built to.

thanks
-eddy
 
K

Ken Varn

I think the only way around this is when you add a reference from one
project to another, is to use the project tab in the Add Reference dialog
box. The reference follows the solution configuration.

Make sure that your project configurations match your solution
configuration. Do this through Build->Configuration Manager option in
VS.NET. The solution config is listed in the drop down list at the top of
the dialog. All projects in that solution should have the appropriate
project config set for the solution config.

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
Eddy said:
Problem:
In 'solution A', 'project 1' references 'project 2'. As such, when
'solution A' is built (debug mode), project '1' creates a dll in /debug, and
project '2' referneces that dll. All is good. When 'solution A' is built in
release mode however, 'project 1' is recompiled and the new dll is put into
'/release', but 'project 2' still references the dll from project '1's
/debug folder, and as such is compiled using the older /debug version of
'project 1's dll.
How do I get around the 'hardcoded' aspect of referencing another project
in a solution (and by hard-coding, I mean that dotnet seems to hard-code a
reference to another project the whatever version of the dll (/debug or
/release) you first built to.
 

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