Can't Resolve System::Diagnostics::Debug 
Author Message
 Can't Resolve System::Diagnostics::Debug

I'm trying to use the Debug::Assert method.  According to the docs, the
Debug class in System::Diagnostics.  But the compiler is complaining about
the line:

System::Diagnostics::Debug.Assert( ( StatusCode > 0 ) && ( StatusCode <=
7 ) );

with the error:

CmiClient.cpp(436) : error C2039: 'Debug' : is not a member of
'System::Diagnostics'

Is there something simple that I am missing here?

Thanks,

Tim Rogers



Sun, 07 Aug 2005 23:28:37 GMT  
 Can't Resolve System::Diagnostics::Debug
Tim,

Quote:
>Is there something simple that I am missing here?

The Debug class is implemented in System.dll, so make sure you include

#using <System.dll>

Mattias

===

http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.



Mon, 08 Aug 2005 05:57:48 GMT  
 Can't Resolve System::Diagnostics::Debug
I can't find that #using statement explicitly in my code, but I assume the
compiler is inserting it because I'm using classes like StringBuilder.
Those are also implemented in System.dll, right?  Is there something special
about the Debug class implementation?

Unless I am wrong about this, I think the documentation is actually
incorrect.  Even intellisense can't find the Debug class.  Not in the System
or System::Diagnostics namespace.  Have you actually used this before?

Thanks,

Tim Rogers


Quote:
> Tim,

> >Is there something simple that I am missing here?

> The Debug class is implemented in System.dll, so make sure you include

> #using <System.dll>

> Mattias

> ===

> http://www.msjogren.net/dotnet/
> Please reply only to the newsgroup.



Mon, 08 Aug 2005 19:36:34 GMT  
 Can't Resolve System::Diagnostics::Debug
Tim,

Quote:
>I can't find that #using statement explicitly in my code, but I assume the
>compiler is inserting it because I'm using classes like StringBuilder.
>Those are also implemented in System.dll, right?

No, StringBuilder is implemented in Mscorlib.dll.

You can find out which assembly that implements a type by looking at
the bottom of the documentation page for that type, in the
Requirements section.

Mattias

===

http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.



Tue, 09 Aug 2005 02:58:51 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Completely STUMPED: 'System.Diagnostics.DebuggableAttribute'

2. 'System.Diagnostics.ProcessInfo' is inaccessible

3. Working with System.Diagnostics.Process

4. Windows service applications (System.Diagnostics.DebuggableAttribute headaches)

5. C# System.Diagnostics

6. System.Diagnostics.Process, WaitForExit

7. declaration issue with system.diagnostics

8. System.Diagnostics.Process.Start

9. Problem with using Systems.Diagnostics

10. C# System.Diagnostics

11. Logging custom events System.Diagnostics.EventLog [ works, but...]

12. System.Diagnostics in Beta2

 

 
Powered by phpBB® Forum Software