-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WPF VCXProj projects should build against the runtime version it references #9490
Comments
WPF was depending on the package version of System.Runtime.Serialization.Formatters but never shipping it. �Instead WPF should depend on the built-in assembly version. To do that we need to update the SDK version since WPF's vcxprojs don't enable the nuget package targeting pack #9490
Here's the relevant place in the SDK that error comes from I think WPF could set |
WPF was depending on the package version of System.Runtime.Serialization.Formatters but never shipping it. �Instead WPF should depend on the built-in assembly version. To do that we need to update the SDK version since WPF's vcxprojs don't enable the nuget package targeting pack #9490
WPF was depending on the package version of System.Runtime.Serialization.Formatters but never shipping it. �Instead WPF should depend on the built-in assembly version. To do that we need to update the SDK version since WPF's vcxprojs don't enable the nuget package targeting pack dotnet#9490
WPF was depending on the package version of System.Runtime.Serialization.Formatters but never shipping it. �Instead WPF should depend on the built-in assembly version. To do that we need to update the SDK version since WPF's vcxprojs don't enable the nuget package targeting pack #9490
Fixes #9490 Unblocks dotnet/sdk#43015 When building wpf inside the VMR, a 10.0.100 SDK is used. WPF currently still targets net9.0. As WPF directly depends on runtime, it already uses 10.0.0-alpha versions of the targeting and runtime packs for managed projects. Enable this for vcxprojs as well so that the host packages can also be restored from the flowing runtime dependency. Fixes errors like these: > The Apphost pack is not installed and NuGet package restore is not supported. Upgrade Visual Studio, remove global.json if it specifies a certain SDK version, and uninstall the newer SDK. For more options visit https://aka.ms/targeting-apphost-pack-missing Pack Type:Apphost, Pack directory: D:\a\_work\1\vmr\.dotnet\packs\Microsoft.NETCore.App.Host.win-x64, targetframework: net9.0, Pack PackageId: Microsoft.NETCore.App.Host.win-x64, Pack Package Version: 9.0.0-rc.2.24473.5
Fixes #9490 Unblocks dotnet/sdk#43015 When building wpf inside the VMR, a 10.0.100 SDK is used. WPF currently still targets net9.0. As WPF directly depends on runtime, it already uses 10.0.0-alpha versions of the targeting and runtime packs for managed projects. Enable this for vcxprojs as well so that the host packages can also be restored from the flowing runtime dependency. Fixes errors like these: > The Apphost pack is not installed and NuGet package restore is not supported. Upgrade Visual Studio, remove global.json if it specifies a certain SDK version, and uninstall the newer SDK. For more options visit https://aka.ms/targeting-apphost-pack-missing Pack Type:Apphost, Pack directory: D:\a\_work\1\vmr\.dotnet\packs\Microsoft.NETCore.App.Host.win-x64, targetframework: net9.0, Pack PackageId: Microsoft.NETCore.App.Host.win-x64, Pack Package Version: 9.0.0-rc.2.24473.5
Fixes #9490 Unblocks dotnet/sdk#43015 When building wpf inside the VMR, a 10.0.100 SDK is used. WPF currently still targets net9.0. As WPF directly depends on runtime, it already uses 10.0.0-alpha versions of the targeting and runtime packs for managed projects. Enable this for vcxprojs as well so that the host packages can also be restored from the flowing runtime dependency. Fixes errors like these: > The Apphost pack is not installed and NuGet package restore is not supported. Upgrade Visual Studio, remove global.json if it specifies a certain SDK version, and uninstall the newer SDK. For more options visit https://aka.ms/targeting-apphost-pack-missing Pack Type:Apphost, Pack directory: D:\a\_work\1\vmr\.dotnet\packs\Microsoft.NETCore.App.Host.win-x64, targetframework: net9.0, Pack PackageId: Microsoft.NETCore.App.Host.win-x64, Pack Package Version: 9.0.0-rc.2.24473.5
WPF's VCXProj projects build against the targeting pack from the SDK. This creates problems like #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 - #9135.
Instead WPF should build against the version of runtime that it depends on.
I see VCXProj's are excluded -
wpf/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets
Lines 15 to 36 in 4c0bdd0
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.
The text was updated successfully, but these errors were encountered: