By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 1,046 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

Nunit..

P: n/a
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.
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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 Cassick (Home)" <rc************@enterprocity.com> wrote in message
news:#E**************@tk2msftngp13.phx.gbl:
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.


Nov 20 '05 #2

P: n/a
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
"Ray Cassick (Home)" <rc************@enterprocity.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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.

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.