Did you also try running Visual Studio as an administrator?
COM Interop of WPF Custom Control - Access denied about the registry key HKEY_CLASSES_ROOT\...
Hi, I have a problem building a project.
My purpose is to build a WPF Custom Control in order to use it in MFC.
But the build cannot be done.
The following informations are what I am through right now:
Project Type: WPF Custom Control Library
Framework Version: 4.7.2
Language: C#
Setup:
- Project Property->Application->Assembly Information->Set Assembly Visible in COM
- Project Property->Build->Output->Regist COM Interop
- Build -> Error
Error Message:
unable to register the assembly "D:{MyWorkSpaceFolder}{MyProjectName}\bin\x64\Release{MyProjectName}.dll".
Access denied.
Check if the application is executed in administrator's authority.
Access denied about the registry key 'HKEY_CLASSES_ROOT{MyProjectName.MyControl}.
I have tried to solve this issue in many ways such as:
- Changing the framework versions
- Changing the HKEY_CLASSES_ROOT's authority in Registry Editor (Which made my computer not working)
- Using different project types
None of them worked. Please help me.
Thank you