2011-10-27 36 views
1

我有這兩個錯誤,因爲我開始我的項目:愚蠢的警告消息不會消失,現在不會讓我發佈

"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."

林不使用電源組或mscomctl,我進口的唯一的東西是:

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

這是我的命,我已經檢查了我最近的引用並沒有什麼在那裏,並檢查我的程序屬性>引用,並沒有提及power pack或mscomctl。

任何想法?

回答

6

對Microsoft.Office.Interop.Excel的引用正在創建前兩個警告。下面是對Microsoft知識庫文章的鏈接能說明問題:

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

您應該能夠通過以下步驟排除錯誤:

1)在Visual Studio中打開引用

2)選擇的Microsoft.Office.Interop.Excel

3)按F4以顯示基準的屬性頁(或從顯示菜單中選擇屬性窗口)

4)將屬性表中的Embed Interop Types值更改爲False。

我會再次檢查,如果引用與PowerPack參考剛剛開始出現,因爲你可能不小心從拖的PowerPack控制到你的形式之一。

如果它仍然是不可見的,請嘗試關閉您的項目,然後打開在記事本或寫字板.vbproj文件並手動刪除提及的PowerPack然後重新打開該解決方案。

+0

好吧......好吧......該死的。我只是犯了編輯我的.vbproj文件完全宿醉的錯誤,我刪除了一些東西,現在我可以加載任何東西。該死的。經過一個小時的努力,我想我已經搞砸了,超過了我的修復能力。我不認爲你有一分鐘​​可以看穿它嗎?我從來沒有打開一個.vbproj,即時通訊不知道什麼即時通訊尋找修復它。 – Nefariis

+0

其實,我修好了,感謝上帝,我救,我從來沒有以防萬一用 – Nefariis

+0

真棒,一切又在另一臺計算機並沒有錯誤在我的所有文件的副本,感謝您的幫助:) – Nefariis