Debug Assertion in Release build in Managed C++

  • Thread starter Thread starter Eyal
  • Start date Start date
E

Eyal

Hi,
We have an issue with Debug Assertion showing in Release
builds in Managed C++! I have created a small managed C++
project that looks like this:
#include "stdafx.h"
#using <mscorlib.dll>
#using <System.dll>
using namespace System;

int _tmain()
{
System::Diagnostics::Debug::Assert(false, "Testing
Assertions");
return 0;
}

When compiled and run in Release, it generate a debug
assertion (just as it would do in Debug builds.
According to the documentation (and logic) debug assertion
should be ignored in release builds.
Are we doing something wrong, or is this a known bug, and
if so is trhere any way around it?
Thank you in advance, Eyal.
P.S. we do not have teh problem in C# projects.
 
Eyal said:
Hi,
We have an issue with Debug Assertion showing in Release
builds in Managed C++!

C++ still needs a #ifdef DEBUG ... #endif. See documentation for the Debug
class.

Jens.
 
Back
Top