Visual Studio 2010 - TYPE_E_REGISTRYACCESS
我正在构建我的VS2010解决方案,在输出窗口中,只有一个项目出错。
在错误选项卡中:
Error 161 Cannot register type library "D:SitesWebsiteMyPortal.Website.ControllersbinDebugMyPortal.Website.Controllers.tlb". Error accessing the OLE registry. (Exception from HRESULT: 0x8002801C (TYPE_E_REGISTRYACCESS)) MyPortal.Website.Controllers
在输出选项卡中:
Compile complete -- 0 errors, 153 warnings
MyPortal.Website.Controllers -> D:SitesWebsiteMyPortal.Website.ControllersbinDebugMyPortal.Website.Controllers.dll
c:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(3341,9): warning MSB3214: "D:SitesWebsiteMyPortal.Website.ControllersbinDebugMyPortal.Website.Controllers.dll" does not contain any types that can be registered for COM Interop.
c:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(3341,9): error MSB3213: Cannot register type library "D:SitesWebsiteMyPortal.Website.ControllersbinDebugMyPortal.Website.Controllers.tlb". Error accessing the OLE registry. (Exception from HRESULT: 0x8002801C (TYPE_E_REGISTRYACCESS))
========== Rebuild All: 8 succeeded, 1 failed, 0 skipped ==========
有任何想法吗?
没有找到相关结果
已邀请:
4 个回复
死狸蔽垂藐
时,我发现您确实需要以管理员身份运行。 没有管理员尝试编译我得到的错误如下: 无法注册程序集“C: TFS Project Src ProjectAddin bin Debug ProjectAddin.dll“ - 访问被拒绝。请确保您正在运行 作为管理员的应用程序访问注册表项 'HKEY_CLASSES_ROOT CLSID {3A6192EA-3C9C-39EB-99A3-3DBFF8CA118F}'是 否认。 上面的注册表项不存在所以我创建它,然后尝试编译我得到: 无法注册类型库 “C: TFS Project Src ProjectAddin bin Debug ProjectAddin.tlb”。错误 访问OLE注册表。 (来自HRESULT的例外:0x8002801C (TYPE_E_REGISTRYACCESS)) 解 关闭Register for COM interop并且错误消失。 Shift +右键单击Visual Studio并以管理员身份打开,打开项目。勾选注册Com interop并成功编译。
伐教爸
缔恃钨
凡夕