JMK
JMK

Reputation: 28059

I added `Marcos Melis Filehelpers` via Nuget and I am getting a warning which I don't understand, what does it mean?

Basically I added Marcos Meli's FileHelpers to my Visual Studio Project and I am getting the following warning:

A reference was created to embedded interop assembly 'x:\y\packages\FileHelpers.2.0.0.0\lib\Interop.Excel.dll' because of an indirect reference to that assembly created by assembly 'x:\y\packages\FileHelpers.2.0.0.0\lib\FileHelpers.ExcelStorage.dll'. Consider changing the 'Embed Interop Types' property on either assembly.

What does this mean and what do I need to do (if anything, it's only a warning, not an error) to fix it? I am using resharper, I am not sure if this is a resharper warning or a Visual Studio warning.

Thanks

Upvotes: 3

Views: 668

Answers (1)

shamp00
shamp00

Reputation: 11326

From MSDN:

You have added a reference to an assembly (assembly1) that has the Embed Interop Types property set to True. This instructs the compiler to embed interop type information from that assembly. However, the compiler cannot embed interop type information from that assembly because another assembly that you have referenced (assembly2) also references that assembly (assembly1) and has the Embed Interop Types property set to False.

To get rid of the warning, find the Microsoft.Office.Interop.Excel reference in solution explorer. Right-click and look at the Properties. There will be one called Embed Interop and it will be set to true - set it to false and the warnings will go away.

Upvotes: 7

Related Questions