1

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

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

and

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

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

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

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

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Nefariis
  • 3,451
  • 10
  • 34
  • 52

1 Answers1

6

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) Open your references in Visual Studio

2) Select Microsoft.Office.Interop.Excel

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

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

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.

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.

competent_tech
  • 44,465
  • 11
  • 90
  • 113
  • alright... well ... damn. I just made the mistake of editing my .vbproj file completely hungover, I deleted something and now I can get anything to load. Damn. After an hour of trying I think I messed it up past my ability to fix it. I dont suppose you have a minute to look through it? Ive never opened a .vbproj and im not quite sure what im looking for to fix it. – Nefariis Oct 28 '11 at 17:59
  • actually, I fixed it, thank god I saved a copy of all my files on another computer that I never use just in case – Nefariis Oct 28 '11 at 18:28
  • awesome, everything works again and no errors, thanks for the help : ) – Nefariis Oct 28 '11 at 18:55
  • I had this Warning: A reference was created to embedded interop assembly 'Microsoft.SqlServer.DTSRuntimeWrap' because of an indirect reference to that assembly from assembly 'Microsoft.SqlServer.ManagedDTS'. Consider changing the 'Embed Interop Types' property on either assembly. I made what you wrote and everything it's OK. Regards! – Sebastián Oct 05 '12 at 16:21
  • It's always good to have a non-hangover computer laying around hahaha. @Nefarii – Donald.Record Oct 22 '15 at 14:37