Nunit..

  • Thread starter Thread starter Ray Cassick \(Home\)
  • Start date Start date
R

Ray Cassick \(Home\)

I have started using this on a regular basis and have a question regarding
conditional compilation.

I have all my test cases wrapped in an #if/#endif that checks to see if the
build is debug or not so when I do a release build I am not compiling in the
test cases. This seems to be working all fine and dandy, but I was wondering
if there is a way to remove the reference to the nunit assembly for a
release build as well.
 
While it does not remove the reference, I wrap all of the Import
NUnit.Framework statements in #If/#End If's also. Given the way that
the JITer works, this means that the DLL will never be loaded in the
release build.

HTH

David
 
Ray,
When I create a project I normally separate most of the logic into different
DLL files, the main EXE normally calls into these dlls.

What this allows me to do is to put all my nunit tests into their own dll,
thus not needing to use #if/#endif statements... Nor worry about the
reference to the nunit framework dll.

Hope this helps
Jay
 
Back
Top