a Reference to 'Microsoft Windows Installer Object Library' could not be added

六月ゝ 毕业季﹏ 提交于 2019-12-06 19:45:32

问题


I'm unable to add reference to 'Microsoft Windows Installer Object Library' with VS2012. Any ideas, what could cause this issue?

When I try to create reference to the COM component, I get this error message "a reference to 'Microsoft Windows Installer Object Library' could not be added".

The VS project is basic class library (c# x86).


回答1:


In Visual Studio go to References > Add Reference... > COM > Browse... > %WINDIR%\system32\msi.dll.

Worked for me on VS2012.




回答2:


Check ur Regedit , Please check these Values

HKEY_CLASSES_ROOT\TypeLib\{000C1092-0000-0000-C000-000000000046}\1.0

If Visual Studio 2010 Installed

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ComponentPickerPages\Recent\{9A341D96-5A64-11D3-BFF9-00C04F990235}\1

If Visual Studio 2008 Installed

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\ComponentPickerPages\Recent\{9A341D96-5A64-11D3-BFF9-00C04F990235}\1


来源:https://stackoverflow.com/questions/16558102/a-reference-to-microsoft-windows-installer-object-library-could-not-be-added

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!