PMCCommand icon indicating copy to clipboard operation
PMCCommand copied to clipboard

Not killing process

Open vurf opened this issue 6 years ago • 2 comments

So many process for visual studio and I cant't twice launch PMCCommand. Write exception: System.Runtime.InteropServices.COMException So many process visual studio

COMException

vurf avatar Jul 24 '18 14:07 vurf

and not removing temp files in C:\Users{name}\AppData\Local\Temp

temp files

vurf avatar Jul 24 '18 14:07 vurf

🤔

I wonder if adding

CleanUp();
// turn off the IOleMessageFilter
MessageFilter.Revoke();

in a finally block and wrapping the Execute method with a try would work. It may be dying in strange way that is not allowing the DTE to quit.

Additionally, the DTE may be detaching the window and not auto calling https://docs.microsoft.com/en-us/dotnet/api/envdte.window.close?view=visualstudiosdk-2017#EnvDTE_Window_Close_EnvDTE_vsSaveChanges_ So, calling close on the window manually may be needed before calling quit() on the DTE. This API is tricky.

As for the temp files not deleting, adding a flag, or simply cleaning up in a finally block would probably work.

Feel free to attempt this changes and see if they address your problem as I currently don't have the personal bandwidth to attempt a fix/verification.

benwtrent avatar Jul 24 '18 14:07 benwtrent