警告消息不会消失,现在不会让我发布 [英] Warning messages won't go away, and now won't let me publish

查看:26
本文介绍了警告消息不会消失,现在不会让我发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我开始我的项目以来,我遇到了这两个错误:

I have had these two errors since I have started my project:

由于从程序集AxInterop.MSComctlLib"间接引用了该程序集,因此创建了对嵌入式互操作程序集stdole"的引用.请考虑更改任一程序集上的嵌入互操作类型"属性."

由于从程序集mscomctl"间接引用了该程序集,因此创建了对嵌入式互操作程序集stdole"的引用.考虑更改任一程序集上的嵌入互操作类型"属性."

然后就在一秒钟前,我开始收到此错误,现在我无法发布该程序.

Then just a second ago, I started getting this error and now I cant publish the program.

引用的程序集Microsoft.VisualBasic.PowerPacks,版本=9.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a,processorArchitecture=MSIL"无法解析,因为它依赖于System.Design,版本=4.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a"不在当前目标框架.NETFramework,Version=v4.0,Profile=Client"中.请删除对不在目标框架中的程序集的引用或考虑重新定位你的项目."

我没有使用电源包或 mscomctl,我导入的唯一内容是:

I'm not using power pack or mscomctl, the only things I am importing are:

System.Windows.Forms.DataVisualization.Charting,System.IO,System.Text.RegularExpressions,Microsoft.Office.Interop.Excel

这让我很伤心,我检查了我最近的参考资料,里面没有任何内容,我检查了我的程序属性>参考资料,但没有任何关于 power pack 或 mscomctl 的内容.

This is killing me, Ive checked my recent references and there is nothing in there, and I check my program properties>references and there is nothing referring to power pack or mscomctl.

推荐答案

对 Microsoft.Office.Interop.Excel 的引用正在创建前两个警告.以下是描述该问题的 Microsoft 知识库文章的链接:

The reference to Microsoft.Office.Interop.Excel is creating the first two warnings. Here is a link to the Microsoft KB article that describes the issue:

http://msdn.microsoft.com/en-us/library/ff182188.aspx

您应该能够通过以下步骤消除错误:

You should be able to remove the error with the following steps:

1) 在 Visual Studio 中打开引用

1) Open your references in Visual Studio

2) 选择 Microsoft.Office.Interop.Excel

2) Select Microsoft.Office.Interop.Excel

3) 按 F4 显示引用的属性页面(或从视图菜单中选择属性窗口)

3) Press F4 to display the properties page for the reference (or select Properties Window from the View menu)

4) 将属性表中的 Embed Interop Types 值更改为 False.

4) Change the Embed Interop Types value in the properties sheet to False.

如果 PowerPack 参考刚刚开始出现,我会再次检查您的参考,因为您可能不小心将控件从 PowerPack 拖到您的表单之一上.

I would check your references again if the PowerPacks reference just started showing up because you may have accidentally dragged a control from PowerPacks onto one of your forms.

如果它仍然不可见,请尝试关闭您的项目,然后在记事本或写字板中打开 .vbproj 文件并手动删除对 PowerPack 的引用,然后重新打开解决方案.

If it still isn't visible, try closing your project, then opening the .vbproj file in Notepad or Wordpad and manually remove the reference to PowerPacks then reopen the solution.

这篇关于警告消息不会消失,现在不会让我发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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