473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

ste
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
called.
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
http://www.kbalertz.com/kbNamed_8915...e.correct.aspx
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
xxx.Flush();

<< dissasembly.. see line 228

221:
222:
223:
224: System.Diagnostics.TraceSource xxx = new
TraceSource("my.edon.trace");
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());
229:
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();

http://www.kbalertz.com/kbNamed_8915...e.correct.aspx


---
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.
http://www.avast.com

Feb 8 '06 #1
2 1549
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
ste
Chris,

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.
http://www.avast.com



---
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.
http://www.avast.com

Feb 9 '06 #3

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

Similar topics

5
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,...
10
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,...
8
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
4
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...
7
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...
1
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...
3
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? ...
9
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.