Debug::Assert showing up in release

  • Thread starter Thread starter High and dRy
  • Start date Start date
H

High and dRy

Hello,
I created a simple .NET C++ console application. And the
Debug::Assert(false) statement is popping a message box in release
version also. Any idea why ?
Any complier settings I need to do to not show it in release version ?

#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
using namespace System::Diagnostics;

int _tmain()
{
// TODO: Please replace the sample code below with your own.
Console::WriteLine(S"Hello World");
Debug::Assert(false);
return 0;
}
 
You should define a macro for your assert and conditionally compile it to
either Debug::Assert or __noop depending on _DEBUG/ NDEBUG.
 
Back
Top