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've manually compiled the project using the below 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've even copied the app.config
to the target folder as ServiceClient.exe.config
Heres 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 see no trace output...
Please try Mono log profiler.
Basically you need to run your application like this:
It will generate a file
output.mlpd
in the same directory. To see it: