Open ericstj opened 4 months ago
Here's the relevant place in the SDK that error comes from https://github.com/dotnet/sdk/blob/68cf2826f641034012815a989fd4933e759f249f/src/Tasks/Microsoft.NET.Build.Tasks/ResolveAppHosts.cs#L295C26-L305
I think WPF could set EnableManagedPackageReferenceSupport
to avoid this:
https://devblogs.microsoft.com/cppblog/announcing-nuget-packagereference-support-for-c-cli-msbuild-projects-targeting-net-core/
WPF's VCXProj projects build against the targeting pack from the SDK. This creates problems like https://github.com/dotnet/wpf/issues/9309 where WPF ends up building against older references than it ships with. It also causes problems where SDK's VMR build fails because it forces WPF to build with the latest runtime which might introduce a compiler warning due to new API - https://github.com/dotnet/wpf/pull/9135.
Instead WPF should build against the version of runtime that it depends on.
I see VCXProj's are excluded - https://github.com/dotnet/wpf/blob/4c0bdd0d1a3002ff5f8be987220019fd98131b57/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets#L15-L36
If I try to remove that exclusion I see:
We ought to be able to workaround this somehow. Even if the VCXProj can't do the restore, other projects in the repo will do it, and the VCXproj should be able to get the path.