问题
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