Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Exclude class from release build

Posted on 2007-10-03
3
Medium Priority
?
339 Views
Last Modified: 2008-02-26
hi there,

I have a unit test class. How do i ensure that the class only appears in my Debug build and not in my release build?

This is for the whole class, not just methods in that class.

thanks
0
Comment
Question by:Valimai
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
JimBrandley earned 2000 total points
ID: 20011964
You can do it this way:
#if DEBUG
public class foo
{
}
#endif

Jim
0
 
LVL 1

Author Comment

by:Valimai
ID: 20011985
Do'h

Thanks, I should have tried that. Reading through the junk results of google, it appeared I had to make custom attributes.

Too much searching and not enought trialling. Cheers, 500 for u.
0
 
LVL 22

Expert Comment

by:JimBrandley
ID: 20011998
You gave me an easy one. Thanks, and good luck.

Jim
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question