Why does NCoverExporer need admin rights with 2.1?

Why does NCoverExporer need admin rights with 2.1?

I just upgraded from NCover 2.0 to 2.1 and discovered that NCoverExporer now requires admin rights to launch and explore a coverage XML. The previous version did not need this. Since I develop with a standard user account under Windows Vista with UAC, I have to switch to an administrator account on each run. Is there any reason for requiring administrative rights now? If so, which new feature caused requiring administrative rights prior to launching?


RE: Why does NCoverExporer need admin rights with 2.1?

are you testing a windows app or a service/IIS?


RE: Why does NCoverExporer need admin rights with 2.1?

No, I am simply running an NUnit test project and capturing the coverage. When I try to launch NCoverExplorer, I get the UAC prompt in Windows Vista. In fact, this happens independent of what I am testing. Simple launching NCoverExplorer requires admin rights. It's not surprising because a shield icon appears overlaid on the base executable icon in Windows Explorer. I looked into the resources and there is a manifest in there says the executable needs admin rights at and from time of launch:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="False"></requestedExecutionLevel> </requestedPrivileges> </security> </trustInfo> </assembly>

So my question still is that why this is even needed with the new version? Why can't the coverage be explored without admin rights?


RE: Why does NCoverExporer need admin rights with 2.1?

The assembly manifest was added in NCover 2.1 to prevent a class of problems around running NCover without admin privileges. Because of the way NCover transfers coverage data between the covered program and itself, it requires a specific privilege. The privilege itself cannot be specified as a requirement, but admin privileges, which include the privilege NCover needs, can.

Several users, running without admin privileges, would launch NCover from NCoverExplorer, and NCover would then promptly fail; but the fail wasn't specific enough to isolate the non-admin problem so when they emailed support it usually took some time to track down the issue. Hence, in 2.1 we enforce NCover's admin privileges requirement (that was there in 2.0) to avoid those support cases.

We are looking at several alternative ways of transfering data between the covered process and NCover which would not require admin privileges.

Stephen Ward