Pre-Compiler Definitions Changing?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve - DND

    Pre-Compiler Definitions Changing?

    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



Working...