Visual Studio - TYPE_E_REGISTRYACCESS [英] Visual Studio - TYPE_E_REGISTRYACCESS

查看:48
本文介绍了Visual Studio - TYPE_E_REGISTRYACCESS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建我的 Visual Studio 解决方案,在输出窗口中,只有一个项目出现错误.

I'm building my Visual Studio solution and in the output window there's an error just for one project.

在错误选项卡中:

Error   161 Cannot register type library "D:\Sites\Website\MyPortal.Website.Controllers\bin\Debug\MyPortal.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:\Sites\Website\MyPortal.Website.Controllers\bin\Debug\MyPortal.Website.Controllers.dll
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3341,9): warning MSB3214: "D:\Sites\Website\MyPortal.Website.Controllers\bin\Debug\MyPortal.Website.Controllers.dll" does not contain any types that can be registered for COM Interop.
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3341,9): error MSB3213: Cannot register type library "D:\Sites\Website\MyPortal.Website.Controllers\bin\Debug\MyPortal.Website.Controllers.tlb". Error accessing the OLE registry. (Exception from HRESULT: 0x8002801C (TYPE_E_REGISTRYACCESS))
========== Rebuild All: 8 succeeded, 1 failed, 0 skipped ==========

有什么想法吗?

推荐答案

我发现有人更改了 csproj 中的属性.

I found out someone changed a property in the csproj.

解决错误:

  • 您只需右键单击该项目,
  • 选择构建标签
  • 转到输出部分
  • 取消选中注册 COM 互操作

这篇关于Visual Studio - TYPE_E_REGISTRYACCESS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆