未找到Visual Studio类异常和未找到名称空间

问题描述 投票:0回答:1

我的c#程序可以成功构建和编译但在运行时失败的问题。每当我运行它时,都会给出此异常。

enter image description here

我还为我的LinkExplorer dll获取了“找不到类型或名称空间”(在运行时),但无法引用它,并且在编译/构建时也没有给我任何错误。当命名空间明显存在时,为什么找不到命名空间?我也尝试构建目标= x64和x86,但仍然给出相同的错误。我的.NET是4.0,与该dll相同。

enter image description here

enter image description here

enter image description here

c# visual-studio dll
1个回答
0
投票

在项目属性->生成选项卡中,您需要标记要注册为COM的项目:

enter image description here

并在“应用程序”选项卡中,单击“组装信息...”,然后在弹出式检查的底部:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.