I have to add one library with .tlb extension to my .csproj. Since in work I don’t have Visual Studio license (because I usually work with other programming languages), I tried to use VS Code for this task and configure .csproj file.
I tried to use solution from this post: VSCode c# add reference to custom assembly
<ItemGroup>
<Reference Include="DllComunVb2008">
<HintPath>..win_b64codebinInfTypeLib.tlb</HintPath>
</Reference>
</ItemGroup>
using INFITF;
Console.WriteLine("Hello, World!");
but it doesn’t work, I get an error:
error CS1529: A using clause must precede all other elements defined in the namespace except extern alias declarations
I tried also another way from here How to reference an assembly(*.dll) without visual studio?:
<ProjectReference Include="C:Program FilesDassault SystemesB31SP3PRALLwin_b64codebinInfTypeLib.tlb" />
But it also doesn’t seem to work
Do you have an idea how to add .tlb libraries to .csproj?