Running code coverage for managed windows service from remote desktop (windows XP)

I'm trying to run code coverage for a managed windows service from remote desktop, this are the steps:

- instrument the code by running

vsinstr -coverage mydll/exe

- resign my assemblies/executable

sn -r mydll/exe keyfile

- start vsperfmon tool in new command window

start vsperfmon/coverage /output:test.coverage /user:"SYSTEM" /user:"LOCAL SERVICE"

- output from vsperfcmd /status:

...

Users with access rights to monitor:
UserName (SID)
NT AUTHORITY\LOCAL SERVICE (S-1-5-19)
NT AUTHORITY\SYSTEM (S-1-5-18)
LOCALMACHINE\username (S-1-5-21-507921405-1715567821-682003330-1003)
LOCALMACHINE\username (S-1-5-21-507921405-1715567821-682003330-1003)

- install the service by running installutil. On vsperfmon window, the installutil process was registered with the code coverage:

Registering Process (2212) - C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe
UnRegistering process (2212)

- start the service by using 'net start "my service"', on vsperfmon window, there is no process is registered with the code coverage.

I logged out & logged back in from console windows (session zero), when the service started, it registered with the code coverage without problem.

What should I do to be able to collect code coverage on remote desktop?

[1895 byte] By [hieu.nguyen] at [2007-12-25]
# 1

hieu,

It is expected that you will not be able to connect to the profiling monitor when not running in session zero. The monitor always runs in session zero. If you want to try working around this I believe that the psexec.exe tool will allow you to start up applications in different programs, but this is unsupported so we really won't be able to help with that.

http://www.sysinternals.com/utilities/psexec.html

~Ian

IanHuff at 2007-9-3 > top of Msdn Tech,Visual Studio Team System,Visual Studio Performance Tools (Profiler)...

Visual Studio Team System

Site Classified