Hi @AArnott, I just want to share an observation with you.
Because
- you have Microsoft.VisualStudio.Threading.Only as package dependency
- Microsoft.VisualStudio.Threading.Only ALSO targets net8.0-windows
- I target net10.0-windows
I transitively get the "Microsoft.WindowsDesktop.App.WPF" FrameworkReference. I already wondered why in my "win-x64/publish" the following files appeared:
- D3DCompiler_47_cor3.dll
- PenImc_cor3.dll
- PresentationNative_cor3.dll
- vcruntime140_cor3.dll
- wpfgfx_cor3.dll
Because you are not multi-targeteting framework net*-windows and I do not depend on it, I simply assume, that I safely can drop the WPF framework reference. I do so by doing:
<Target Name="SuppressTransitiveWpfFrameworkReference"
AfterTargets="ResolvePackageAssets"
BeforeTargets="AddTransitiveFrameworkReferences">
<ItemGroup>
<TransitiveFrameworkReference Remove="Microsoft.WindowsDesktop.App.WPF" />
</ItemGroup>
</Target>
It makes me curious, is this normal behaviour? I would expect that since your package is not targeting net8-windows or greater, that NuGet would rather not tend to resolve the net*-windows on my side. Anyway, I think you cannot do anything, right? And I am right to assume, that you are not removing Microsoft.VisualStudio.Threading.Only anytime soon, right? 🙂 So just consider this issue as informational, for others that may face this slight oddity.
Hi @AArnott, I just want to share an observation with you.
Because
I transitively get the "Microsoft.WindowsDesktop.App.WPF"
FrameworkReference. I already wondered why in my "win-x64/publish" the following files appeared:Because you are not multi-targeteting framework net*-windows and I do not depend on it, I simply assume, that I safely can drop the WPF framework reference. I do so by doing:
It makes me curious, is this normal behaviour? I would expect that since your package is not targeting net8-windows or greater, that NuGet would rather not tend to resolve the net*-windows on my side. Anyway, I think you cannot do anything, right? And I am right to assume, that you are not removing Microsoft.VisualStudio.Threading.Only anytime soon, right? 🙂 So just consider this issue as informational, for others that may face this slight oddity.