release and debug mix during testing

G

Guest

Does C# have problems when running a mix of release and debug builds of
projects? I'm talking about something similar to the DLL hell you could get
into with VC6 and the MFC shared library. If not, why do the debug and
release projects write to \Debug and \Release subdirectories by default? If
so, what do I need to do to be able to mix them without problems?
 
S

Scot T Brennecke

The reason for separate directories is obvious to me: you want to be able to differentiate between
the modules built with extra debug information and those that weren't, even though the filenames may
be the same for both builds. If they were all thrown into the same folder, the release and debug
versions would always be overwriting each other.

As for the intermixing being a problem, I don't think it would be nearly as troublesome as with a
more powerful lower-level language like C++. All I can suggest is "try it, and let us know if you
find a problem".
 
G

Guest

"Just trying it" is a bad idea. In C++ that could cause a bug that John
Robbins in his MS Press book "Debugging Applications for Microsoft .NET"
describes as "one of the most insidious bugs there is - a bug that could take
months to track down". Having lived through tracking down such a bug, I can
attest to the difficulty and didn't want to be burned again.

Fortunately, John Robbins was kind enough to reply to my question. His
answer as regards mixing release and debug C# code (NOT C++ which can still
have the problem when generating native code):
"The good news with .NET is that you can mix and match release and debug
builds without worry about any runtime issues. The C# compiler itself does
not produce native code, only the JIT (just in time) compiler. The .NET FCL
(framework class library) is full release build, so you don't have to worry
about much with it."
 

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