This project is read-only.
1

Closed

Everything seems to work, except nothing is shown in traceview (Beta)

description

I am using traceview statements like this.....
 
EtwTrace.Trace(EtwTraceLevel.Information, EtwTraceFlag.Component, "New instance cache for {0}, Cache Guid {1}, purge interval {2}", this.InternalIdentifier, this.cacheGuid, this.PurgeInterval);
 
I open the file and start the trace exactly like in your example, (with my own guid ) but i see nothing happening.
 
Now i seem to recall that the old nTrace would create all kind of preprocess files....
 
Content of TMF File..
//PDB:
//PDB: Last Updated: Friday, April 29, 2011 9:25:53 PM UTC by NTrace.Preprocessor.DLL
a3e291a8-c410-71a2-91b3-a27954be9d7c bbp2010.Caching // SRC=TraceHelper.cs MJ= MN=
 
Content of TMC file
//PDB:
//PDB: Last Updated: Friday, April 29, 2011 9:25:53 PM UTC by NTrace.Preprocessor.DLL
4F766B95-81E0-44BB-BD00-579F76B54734
bbp2010.Caching
Component
Protocol
Connection
Security
Diagnostic
Authentication
Parsing
Network
StackTracing
 
Am i doing anything wrong ?

file attachments

Closed Jul 11, 2011 at 7:46 PM by ahopper
Resolved

comments

well0549 wrote Apr 29, 2011 at 10:52 PM

if i build i get the fiollowing (my project is on the E drive

------ Rebuild All started: Project: bbp2010.Caching, Configuration: Debug Any CPU ------
Cache.cs(109,13): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(109,28): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(109,55): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
Cache.cs(181,13): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(181,28): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(181,55): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
Cache.cs(191,13): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(191,28): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(191,55): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
Cache.cs(212,25): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(212,40): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(212,67): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
Cache.cs(239,21): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(239,36): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(239,63): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
Cache.cs(258,21): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(258,36): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(258,63): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
Cache.cs(272,17): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(272,32): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(272,59): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
Cache.cs(434,13): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(434,28): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(434,55): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
Cache.cs(479,25): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(479,40): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(479,67): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
Cache.cs(485,25): warning CS0103: The name 'EtwTrace' does not exist in the current context
Cache.cs(485,40): warning CS0103: The name 'EtwTraceLevel' does not exist in the current context
Cache.cs(485,67): warning CS0103: The name 'EtwTraceFlag' does not exist in the current context
C:\Program Files\MSBuild\NTrace\v2.0\NTrace.CSharp.v4.0.targets(154,5): warning MSB3021: Unable to copy file "obj\Debug\bbp2010.Caching.dll" to "obj\Trace\bbp2010.Caching.dll". Could not find file 'obj\Debug\bbp2010.Caching.dll'.
C:\Program Files\MSBuild\NTrace\v2.0\NTrace.CSharp.v4.0.targets(154,5): warning MSB3021: Unable to copy file "obj\Debug\bbp2010.Caching.pdb" to "obj\Trace\bbp2010.Caching.pdb". Could not find file 'obj\Debug\bbp2010.Caching.pdb'.
bbp2010.Caching -> E:\Projects\bbp2010\bbp2010.Caching\bin\Debug\bbp2010.Caching.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

well0549 wrote Apr 29, 2011 at 11:00 PM

This is what i have installed:

Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.0.30319 RTMRel

Installed Version: Ultimate

Microsoft Office Developer Tools 01019-532-2002102-70168
Microsoft Office Developer Tools

Microsoft Visual Basic 2010 01019-532-2002102-70168
Microsoft Visual Basic 2010

Microsoft Visual C# 2010 01019-532-2002102-70168
Microsoft Visual C# 2010

Microsoft Visual C++ 2010 01019-532-2002102-70168
Microsoft Visual C++ 2010

Microsoft Visual F# 2010 01019-532-2002102-70168
Microsoft Visual F# 2010

Microsoft Visual Studio 2010 Architecture and Modeling Tools 01019-532-2002102-70168
Microsoft Visual Studio 2010 Architecture and Modeling Tools

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Microsoft Visual Studio 2010 Code Analysis Spell Checker 01019-532-2002102-70168
Microsoft Visual Studio 2010 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Microsoft Visual Studio 2010 Team Explorer 01019-532-2002102-70168
Microsoft Visual Studio 2010 Team Explorer

Microsoft Visual Web Developer 2010 01019-532-2002102-70168
Microsoft Visual Web Developer 2010

Crystal Reports Templates for Microsoft Visual Studio 2010
Crystal Reports Templates for Microsoft Visual Studio 2010

Microsoft BizTalk Server 2010 03212-270-3488714-04766
Microsoft BizTalk Server 2010

Microsoft StyleCop 4.4
Provides source code style and consistency tools.

NTrace v2.0 2.0
NTrace is a library that provides flexible, high-performance, and zero-config trace logging for your C# applications using Event Tracing for Windows.

.NET Reflector
Visual Studio add-in that integrates .NET Reflector into Visual Studio to allow you to seamlessly debug into third-party code and assemblies, even if you don't have the source code for them.
Visit www.red-gate.com for more information.
Copyright (c) 2009-2010 Red Gate Software Inc.

ahopper wrote Apr 30, 2011 at 2:43 PM

It looks like the preprocessor run had problems. What does your .csproj look like?

wrote Apr 30, 2011 at 2:44 PM

wrote May 2, 2011 at 2:25 PM

well0549 wrote May 2, 2011 at 2:26 PM

Added project file

well0549 wrote May 2, 2011 at 2:28 PM

If i create a hello world application everything works fine....
So it's something in the project

well0549 wrote May 2, 2011 at 3:40 PM

Ok forget this issue....

I solved it by adding a ref to Ntrace and Ntrace.Filters.
And then instead op using ntrave.trace, i used provider.trace, and instead of EtwTraceLevel i used Tracelevel (from filters) seems to work right now....

well0549 wrote May 2, 2011 at 3:44 PM

Nope, it only compiled a lot better (without warnings but it doesn't work)

If you want to use the level and the flags how should you initialize Ntrace then ?

ahopper wrote May 2, 2011 at 5:39 PM

Thanks for attaching the project; your Cache.cs file's build action is set to Compile rather than Instrument, and I believe that's what's causing your issue. I can see how it's easy to forget this step; I'll see if I can come up with a way to trap errors like these and present something a bit more helpful.

well0549 wrote May 2, 2011 at 8:15 PM

Thanks that did the trick.

However, i still had a problem with the namespaces and the name of the asembly.
After i changed my namespace to bbp2010 instead of BizTalk.BestPractice i was able to compile
and see those sweet n fast traces !

Thanks for your help.....

wrote Jul 11, 2011 at 7:46 PM

wrote Feb 14, 2013 at 2:55 AM

wrote May 16, 2013 at 8:07 AM