adding a listener in app.config

M

MR

i am trying to add a listener to my application in the config file. The
documentation says to add it as following:

<system.diagnostics>
<trace autoflush="true" indentsize="0">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener, system,
version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
initializeData="myListener.log" />
</listeners>
</trace>


when i add this to my app.config file, "initializeData" is underlined and
the error says: the "initializeData" attribute is not declared

why do i get this error? i don't see any other way to add a text trace file.
how id this supposed to work?

thanks
m
 
M

Michael Nemtsev

But does in work or not?
Not allways what is underlines considered wrong :)
maybe your intellisence xsd is just damaged
 
M

MR

no it does not work. i get a runtime error.

Michael Nemtsev said:
But does in work or not?
Not allways what is underlines considered wrong :)
maybe your intellisence xsd is just damaged

--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog: http://spaces.live.com/laflour



MR said:
i am trying to add a listener to my application in the config file. The
documentation says to add it as following:

<system.diagnostics>
<trace autoflush="true" indentsize="0">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener, system,
version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
initializeData="myListener.log" />
</listeners>
</trace>


when i add this to my app.config file, "initializeData" is underlined and
the error says: the "initializeData" attribute is not declared

why do i get this error? i don't see any other way to add a text trace
file.
how id this supposed to work?

thanks
m
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top