Open ds5678 opened 2 years ago
Not sure how useful it will be here, but I never had this problem because I added the dependency only for the frameworks who need it.
Like so:
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[7.0.0]" />
</ItemGroup>
On a brand new project with this csproj file, everything compiles fine:
However, if the csproj file is changed slightly, it no longer does:
In Visual Studio 2022, I get this error:
This points to a line in
TunnelVisionLabs.ReferenceAssemblyAnnotator.targets
: