警告信息不会消失,现在不会让我发布

Nef*_*iis 1 vb.net visual-studio-2010 visual-studio

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

"A reference was created to embedded interop assembly 'stdole' because of an indirect reference to that assembly from assembly 'AxInterop.MSComctlLib'. Consider changing the 'Embed Interop Types' property on either assembly."

A reference was created to embedded interop assembly 'stdole' because of an indirect reference to that assembly from assembly 'mscomctl'. Consider changing the 'Embed Interop Types' property on either assembly."

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

"The referenced assembly "Microsoft.VisualBasic.PowerPacks, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project."

我没有使用power pack或mscomctl,我导入的唯一内容是:

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

这是杀了我,我检查了我最近的引用,并没有任何内容,我检查我的程序属性>引用,没有任何指的是power pack或mscomctl.

com*_*ech 6

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

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

您应该能够使用以下步骤删除错误:

1)在Visual Studio中打开您的引用

2)选择Microsoft.Office.Interop.Excel

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

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

如果PowerPacks参考刚刚开始显示,我会再次检查你的引用,因为你可能不小心将一个控件从PowerPacks拖到了你的一个表单上.

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