SetUp project includes debug dependencies

  • Thread starter Thread starter bob
  • Start date Start date
B

bob

Hello,

I have a SetUp project in my solution. When I add the primary output
of certain projects to it they add their project dependencies twice -
the debug and the release.

Anyone known what I'm doing wrong? I'm worried that I'll end up
shipping the debug version.

Thanks,

Bob
 
I'd start by checking Project Properties > Configuration Properties
to make sure the project is in release mode.

In your code you can also write a short test like this example...

// Framework Classes
using System.Diagnostics;

// Class Definition
[Conditional("DEBUG")]
public void InitializeDebugMode( )
{
// A known label used for something useful within the UI
// or a test label placed inconspicuously used for feedback only
lblSomeLabel.Text = "Conditional: Debug Mode";
}

// Page_Load
if(!Page.IsPostBack)
{
#if DEBUG
Debug.WriteLine("Program Running in Debug Mode");
InitializeDebugMode( );
}

Compile and run the program. Look for the Debug.WriteLine
results in the OutPut window. Using the label is another level of
visual confirmation and may not be necessary.

The #if is called a preprocessor directive and can be disabled
by entering #undef DEBUG as the *very first line of code*
in the entire .cs file. I keep an //#undef there and add or remove
comments as may be required.


--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
 
Back
Top