I had a project made in visual studio, for .Net Framework 4.8 that had a reference to Microsoft.Office.Interop.Excel
.
Now I’m porting this project to VS Code with a .net SDK project, still pointing to net48
, though (for compatibility reasons)
But I can’t seem to reference the excel library, how can I do that?
For further information, the old project had:
<Reference Include="Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
But if I add this line in the sdk project, the references appear with an exclamation mark in VS Code.
If instead I use <COMReference>
, the reference totally disappears (I don’t even know if that is correct, actully).
In any case, I’m unable to access the namespace Microstof.Office.Interop.Excel
.
So, how do I reference it properly in my project?
Not “the” answer, but appreciated: is using interop not recommended? What is recommended?
4