Are there application traces in mono?

Here is my project structure:

. |-- app.config |-- bin | `-- Debug |-- NLog.config |-- NLog.xsd |-- obj | `-- Debug |-- packages.config |-- Program.cs |-- Properties | `-- AssemblyInfo.cs |-- ServiceClient.csproj `-- Web References `-- TestSvc |-- Reference.cs |-- Reference.map |-- TestService.disco `-- TestService.wsdl 7 directories, 14 files 

I manually compiled the project using the following mcs command:

 mcs -d:TRACE -d:DEBUG -r:System.Web.Services.dll -out:./bin/Debug/ServiceClient.exe Web\ References/TestSvc/Reference.cs Program.cs 

I even copied app.config to the target folder as ServiceClient.exe.config

This is what the configuration looks like:

 <?xml version="1.0" encoding="utf-8"?> <configuration> <system.diagnostics> <sharedListeners> <add name="console" type="System.Diagnostics.ConsoleTraceListener"/> <add name="nlog" type="NLog.NLogTraceListener,Nlog"/> </sharedListeners> <sources> <source name="System.Net" switchValue="All"> <listeners> <add name="nlog"/> </listeners> </source> <source name="System.Net.Sockets" switchValue="All"> <listeners> <add name="nlog"/> </listeners> </source> </sources> </system.diagnostics> </configuration> 

But when I run:

 mono ServiceClient.exe "hello world" 

I do not see the trace output ...

+7
c # mono tracing ms-tracing-eventsource
source share
1 answer

Try Monographic Profiler .

Basically you need to run the application as follows:

 mono --profile=log ServiceClient.exe "hello world" 

It will generate the output.mlpd file in the same directory. To see this:

 mprof-report output.mlpd 
0
source share

All Articles