MaciekLesiczka / netric

netric core sources
Apache License 2.0
13 stars 2 forks source link

Visual Studio Performance Explorer won't work when Netric is installed #8

Open fatphil2001 opened 7 years ago

fatphil2001 commented 7 years ago

Attempting to attach to the w3wp process using Visual Studio Performance Explorer in VS2015 shows an error:

Wrong setting of COR_PROFILER environment variable in target process. Please use VSPerfClrEnv.cmd to set environment variables correctly.

Many attempts at setting the COR_PROFILER using VSPerfClrEnv.cmd /globalsamplegc followed by iisreset and a reebot didn't fix it. Only fix found was to uninstall. :'(

MaciekLesiczka commented 7 years ago

Well, I would expect this as profilers that utilize COR_PROFILER don't work well with each other, this is just how the profiling API works. One will break another, because they both try to set the same environment variable with different value. It is pretty much applicable to any profiler, New Relic, SCOM, etc.

Because Netric is enabled during installation, uninstalling + iis reset it is the only option right now, to make another profiler work properly.

Thanks for the reminder, this issue is gonna be on the top of the list in FAQ/Troubleshooting wiki section (if I finally create one:))

fatphil2001 commented 7 years ago

If it's just a change to the registry or environment variables then I could just create a couple of scripts to enable/disable as necessary. Is that feasible ?

MaciekLesiczka commented 7 years ago

Yes, that should be enough.

fatphil2001 commented 7 years ago

Could you tell me what keys and values get written to the Registry? So I can write my workaround scripts? Thanks

MaciekLesiczka commented 7 years ago

Take a look at the installer: https://github.com/MaciekLesiczka/netric/blob/master/src/Netric.Installer/Product.wxs#L61