Pre-Compiler Definitions Changing?

S

Steve - DND

I have a web project which references some assemblies from other projects I
have worked on in different solutions, and am running into some quirky
behavior.

My web project assembly is DND.WebCenter, and references my assembly DND
(function library and common tools). I manually specify the AssemblyVersion
for both of the assemblies, so I know they are always correct.

DND has some constants conditionally defined, so that when DEBUG is
declared, the constants(some file paths, and such), map to a particular
directory on the development machine, whereas when RELEASE is declared, the
constants map to the proper locations on the production server.

The production web server, has a Release built copy of both assemblies on
it, and everything works perfect.

The problem I run into is when I build DND.WebCenter for release, and DND
happens to have been last built as Debug(for some testing). When I upload
DND.WebCenter to the live server, and not DND. Nothing works as it should in
terms of file paths, even though the copy of DND was previously built as
Release, and uploaded to the server.

It seems that DND.WebCenter feels that it should be referencing DND with
DEBUG declared, and is acting as such. If I go and rebuild DND as release,
then build DND.WebCenter as release, and upload to the server, then all is
well.

Is this the intended functionality of the .Net Framework? If it is, it is
certainly something to watch out for, since I will always need to make sure
all referenced assemblies are built as release, even if a same version
release already exists on the production web server.

Thanks,
Steve
 

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

Members online

Forum statistics

Threads
474,078
Messages
2,570,572
Members
47,204
Latest member
MalorieSte

Latest Threads

Top