Debug Assertion in Release build in Managed C++

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.
 
J

Jens Thiel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top