I try to add the WMPLib nuget package as a package reference to my project, but in the code the classes could not be found.
This is in my csproj file:
<PackageReference Include="WMPLib">
<Version>1.0.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
And in my cs file I have:
using WMPLib;
And this is the error:
error CS0246: The type or namespace name 'WMPLib' could not be found (are you missing a using directive or an assembly reference?)
Here I read that "the issue is due to the new NuGet format reference 'PackageReference' ... the folders and files aren't added".
Does someone know more about this? And is the solution using a package.config instead of a package reference?