[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Help! Could find type error

Naraendira Kumar R.R.

11/23/2002 6:11:00 AM

Hi,
I get the following exception in my appliation, when I use
Trace.WriteLine("Test!")

>> System.Configuration.ConfigurationException: Couldn't find type for class
System.Diagnostics.TextWriterTraceListener,System.

I have these settings in my config file & this seems to be exactly as
specified in the document.
=====
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener,System"
initializeData="StackInfo.log" />
<remove type="System.Diagnostics.DefaultTraceListener,System"/>
</listeners>
</trace>

Can somebody tell me what is causing this error, please. How can I fix this
& get my trace to write to the log file.

Thanks in advance.
-Naraen






2 Answers

(Mike Clay (MSFT))

11/25/2002 9:46:00 PM

0

Hi Naraendira,

I was able to get the same error by using the MSDN provided code sample.
You can actually eliminate the error by removing the "System" from the
"System.Diagnostics.TextWriterTraceListener,System" statement in your
app.exe.config. You'll get the output in the console but nothing gets
written to the text file. I'm assuming you are supposed to get output in
the console as well as the text file. Either way, its looks like it may an
error with the documentation. I'll look into it further.


Mike Clay, MCSD
Beta Technical Support


This posting is provided "AS IS" with no warranties, and confers no rights.
© 2002 Microsoft Corporation. All rights reserved.

Naraendira Kumar R.R.

11/26/2002 11:47:00 PM

0

Thanks Mike.

That actually worked (to my astonishment, I must admit).

So are there rules to when we should specify the Assembly in which the
TraceListener is implemented & when we should'nt?

Gracias,
-Naraen




"Mike Clay (MS)" <mclay@online.microsoft.com> wrote in message
news:QfCwEPMlCHA.2512@cpmsftngxa08...
> Hi Naraendira,
>
> I was able to get the same error by using the MSDN provided code sample.
> You can actually eliminate the error by removing the "System" from the
> "System.Diagnostics.TextWriterTraceListener,System" statement in your
> app.exe.config. You'll get the output in the console but nothing gets
> written to the text file. I'm assuming you are supposed to get output in
> the console as well as the text file. Either way, its looks like it may
an
> error with the documentation. I'll look into it further.
>
>
> Mike Clay, MCSD
> Beta Technical Support
>
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> © 2002 Microsoft Corporation. All rights reserved.
>