c# - Performance Counters not being released -
All:
I am using some custom display counters that I have created, Examples are, with the lifetime of "process".
Problem: When I VS I want to debug in, if I stop this process and start it again, then I get an exception when my code attempt to make my display counter an exception indicates that extremist counters are already present and I can not make them until the ownership process is issued to them.
Once I get this error, there is only one way - I have to shut down and restart the Visual Studio - it seems that VS My process gets ownership of the Lifetime Performance Counter, though it was actually made from the proprietary process. With any thought what can I do about it?
BTW: The problem only appears when my code actually writes to a display counter before it's switched off.
I think that you are fighting with the hosting studio hosting process, it is a subsidiary. Which hosts CLR to improve debugging experience, whenever you get a project loaded in VS, then it is always running. Scroll down to Project + Properties, Debug Tab, uncheck the "Enable Visual Studio Hosting Process" checkbox.
This affects the debugging session to a lesser extent, most notably the output written by the console. WrightLine () is no longer visible in the output window in your program, some obscure security options, not perfectly well documented. I suspect that you will have a problem.
Comments
Post a Comment