472,993 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

Please help VS2005 generates no MSIL for some statements..dissasembly attached

VS2005, .NET2

I have a dll that is using TraceSources with no problems.

The dll is linked to a webservice.

The webservice creates its own traceSource and every thing looks fine..
however whenever i try and call a TraceEvent, TraceData method nothing gets
Looking at the dissasembly, it is easy to see why.. no code has been
generated for the call .. arghhhhhhhhh
My problem is very similar to this issue, but this issue is for VS2003 and i
presume it has been fixed in 2005
Can anyone suggest a workaround?
<<< Source below

System.Diagnostics.TraceSource xxx = new TraceSource("my.trace");
xxx.Switch = new SourceSwitch("my.trace.switch");
xxx.Listeners.Add(new ConsoleTraceListener());
xxx.Switch.Level = SourceLevels.Warning;
xxx.TraceData(TraceEventType.Critical, 1, new Object());
<--- no code generated for this line
bool b = xxx.Switch.ShouldTrace(TraceEventType.Verbose); <---
no problems here
xxx.TraceEvent(TraceEventType.Critical, 12, "help");
<--- no code generated for this line

<< dissasembly.. see line 228

224: System.Diagnostics.TraceSource xxx = new
00000045 mov ecx,7A752FE8h
0000004a call 01330944
0000004f mov esi,eax
00000051 mov edx,dword ptr ds:[03A4ACB8h]
00000057 mov ecx,esi
00000059 call 797701EC
0000005e mov dword ptr [ebp-38h],esi
225: xxx.Switch = new SourceSwitch("my.trace.switch");
00000061 mov ecx,7A75640Ch
00000066 call 01330944
0000006b mov esi,eax
0000006d mov edx,dword ptr ds:[03A4ACBCh]
00000073 mov ecx,esi
00000075 call 7976AF48
0000007a mov edx,esi
0000007c mov ecx,dword ptr [ebp-38h]
0000007f cmp dword ptr [ecx],ecx
00000081 call 79771F08
00000086 nop
226: xxx.Listeners.Add(new ConsoleTraceListener());
00000087 mov ecx,dword ptr [ebp-38h]
0000008a cmp dword ptr [ecx],ecx
0000008c call 79771EC8
00000091 mov edi,eax
00000093 mov ecx,7A7645F4h
00000098 call 790FC9CC
0000009d mov esi,eax
0000009f mov ecx,esi
000000a1 call 79AE8990
000000a6 mov edx,esi
000000a8 mov ecx,edi
000000aa cmp dword ptr [ecx],ecx
000000ac call 7976F638
000000b1 nop
227: xxx.Switch.Level = SourceLevels.Warning;
000000b2 mov ecx,dword ptr [ebp-38h]
000000b5 cmp dword ptr [ecx],ecx
000000b7 call 79771EE8
000000bc mov esi,eax
000000be mov ecx,esi
000000c0 mov edx,7
000000c5 cmp dword ptr [ecx],ecx
000000c7 call 7976AFC8
000000cc nop
228: xxx.TraceData(TraceEventType.Critical, 1, new Object());
230: bool b = xxx.Switch.ShouldTrace(TraceEventType.Verbose);
000000cd mov ecx,dword ptr [ebp-38h]
000000d0 cmp dword ptr [ecx],ecx
000000d2 call 79771EE8
000000d7 mov esi,eax
000000d9 mov ecx,esi
000000db mov edx,10h
000000e0 cmp dword ptr [ecx],ecx
000000e2 call 7976AFEC
000000e7 mov esi,eax
000000e9 mov eax,esi
000000eb and eax,0FFh
000000f0 mov dword ptr [ebp-28h],eax
234: xxx.TraceEvent(TraceEventType.Critical, 12, "help");
235: xxx.Flush();


avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0606-2, 07/02/2006
Tested on: 08/02/2006 20:32:27
avast! - copyright (c) 1988-2005 ALWIL Software.

Feb 8 '06 #1
2 1531
Does tracing depend on being in debug mode? Isn't there a /debug or
/trace switch to the compiler that enables it?

Feb 8 '06 #2

Thanks!!!! You were right....
Unable to find a setting in the web.config but #defining TRACE in my c#
source fixed it

"Chris Dunaway" <du******@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Does tracing depend on being in debug mode? Isn't there a /debug or
/trace switch to the compiler that enables it?

avast! Antivirus: Inbound message clean.
Virus Database (VPS): 0606-2, 07/02/2006
Tested on: 09/02/2006 19:22:08
avast! - copyright (c) 1988-2005 ALWIL Software.

avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0606-2, 07/02/2006
Tested on: 09/02/2006 19:41:17
avast! - copyright (c) 1988-2005 ALWIL Software.

Feb 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql,...
by: Raymond Lewallen | last post by:
Is there some article out there that helps in reading MSIL? I've been looking but can't find anything, and I'm probably just looking in the wrong spots for the wrong keywords. I understand mov,...
by: Cyberdog | last post by:
HI, I am learning javascript, and at the moment I am working on truth tables. Can someone please tell me, is "NOT A AND B" the same as "NOT A AND NOT B". Thanks
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record...
by: carl.manaster | last post by:
Hi, I'd like to take a string containing MSIL code, assemble it, execute it, and receive the result all from my running C# application. So far I've managed to manually create some MSIL code...
by: John Doe | last post by:
Hi all, I have a lot of confusion about what this runtime environment is. When I write an application with unmanaged code and unmanaged data, can I compile it to the MSIL, or it will compile...
by: Mark Fox | last post by:
Hello, I have read a lot about how the .NET Framework uses MSIL as its intermediate language. If I have a project in C# in VS.NET 2003, how do I get the MSIL for it so I could look at it? ...
by: Joăo Santa Bárbara | last post by:
Hi all, i have instaled VS2005 Develpers Edition, and i have migrate my VB code from VS2003 to VS2005(RTM). and so far i´m not pleased with this migration. i have lots of ide Bugs, some forms...
by: Thom Anderson | last post by:
Hi. I have been asked to create a web tool for my company. Basically an employee will use a user control (a tree view containing information about our company) and when they get to where they...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.