dotnet / dotnet/samples

[OutOfProcCOM] COMRegistration.LocalServer.Unregister does not fully delete the COM class from registry

Open
#5,960 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
5.1k
Avg merge
9h 11m
Merged PRs (30d)
1

Description

The `ExeServer` project in the [OutOfProcCOM](https://github.com/dotnet/samples/tree/main/core/extensions/OutOfProcCOM) sample doesn't _fully_ unregister itself when starting with `/unregserver`. This seem to be caused by the `COMRegistration.LocalServer.Unregister` function only deleting the content inside the `HKCR\CLSID\{class-id}` folder, but not the folder itself.

Steps to reproduce:
* Build [OutOfProcCOM](https://github.com/dotnet/samples/tree/main/core/extensions/OutOfProcCOM) solution
* Run `ExeServer.exe /regserver` with admin privileges.
* Run `ExeServer.exe /unregserver` with admin privileges.
* Open regedit.exe and observe that there's still a `HKCR\CLSID\{AF080472-F173-4D9D-8BE7-435776617347}` folder there.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.