George Polevoy
George Polevoy

Reputation: 7681

NET Coverage tools require admin rights?

I'm trying to find a coverage tool i can use in a very restrictive dev environment, where nobody has admin rights.

Which NET coverage tools require admin rights to run?

What coverage tools do not have this requirement, or have a workarounds to run without admin rights?

As far as i know, NCover needs admin rights to run, what about the other frameworks? (DotCover, Semantic Designs, Partcover, Visual Studio coverage)

Please share your experience, it's not easy to find anything in the docs of various tools on this topic.

Upvotes: 1

Views: 360

Answers (4)

NCover Support
NCover Support

Reputation: 271

NCover 3 does require admin privileges for installation and license activation, but after that, NCover will not require admin rights to profile an application that's running in the same session.

NCover will need admin rights when covering IIS or a Windows service, since those do start a separate session.

Upvotes: 0

Shaun Wilde
Shaun Wilde

Reputation: 8378

Both PartCover and OpenCover support per-user registration. i.e. the equivalent of

regsvr32 /n /i:user

Upvotes: 0

bryanbcook
bryanbcook

Reputation: 18363

There are a few things that profiler tools will require.

Environment Variables

The majority of coverage tools use the .NET ProfilerAPI to inspect managed code as it's executed. Because the ProfilerAPI uses environment variables to determine if profiling is enabled and which profiler to use, the coverage tool typically writes to these environment variables before and after the coverage session.

Users can write to local environment variables without issue, but if the tool is trying to write to system level environment variables, you'll need admin permissions.

Registry Access

One of the environment variables is the Class Identifier for the unmanaged profiler. If the tool needs to go to the registry to get this identifier, you'll need admin permissions.

The other consideration is that some tools register the unmanaged COM dll before the coverage session to play well with the .net xcopy deployment strategy. Old versions of NCover used to do this.

The proposed solution is to register the dll as an administrator. Once registered, the tool shouldn't require permissions to perform this additional step.

Upvotes: 2

Ira Baxter
Ira Baxter

Reputation: 95420

Our SD C# Test Coverage tool usually requires admin rights to install. It does not require admin rights to run. Similarly for the other SD test coverage tools and products.

Upvotes: 0

Related Questions