-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update the sdk target to net10.0 #43015
Conversation
…pdate-the-sdk-target-to-net10.0
…pdate-the-sdk-target-to-net10.0
There are a bunch of template test failure error messages as follows:
@dotnet/templating-engine-maintainers @dotnet/arcade-contrib Could you please take a look at this issue? |
Directory.Build.props
Outdated
<ToolsetTargetFramework>$(SdkTargetFramework)</ToolsetTargetFramework> | ||
<VisualStudioServiceTargetFramework>net8.0</VisualStudioServiceTargetFramework> | ||
|
||
<!-- We used to have scenarios where the MSBuild host (VSMac) had an older .NET, but don't any more. --> | ||
<ResolverTargetFramework>$(SdkTargetFramework)</ResolverTargetFramework> | ||
<ResolverTargetFramework>net9.0</ResolverTargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the build error message when set to net10.0.
C:\Users\AzureTest\Desktop\109\sdk\.dotnet\sdk\10.0.100-alpha.1.24507.21\Microsoft.Common.CurrentVersion.targets(1889,5): error NU1702: ProjectReference 'C:\Users\AzureTest\Desktop\109\sdk\test\Microsoft.NET.TestFramework\Microsoft.NET.TestFramework.csproj' was resolved using '.NETFramework,Version=v4.7.2' instead of the project target framework '.NETCoreApp,Version=v9.0'. This project may not be fully compatible with your project. C:\Users\AzureTest\Desktop\109\sdk\.dotnet\sdk\10.0.100-alpha.1.24507.21\Microsoft.Common.CurrentVersion.targets(1889,5): error NU1702: ProjectReference 'C:\Users\AzureTest\Desktop\109\sdk\src\Cli\Microsoft.DotNet.Cli.Utils\Microsoft.DotNet.Cli.Utils.csproj' was resolved using '.NETFramework,Version=v4.7.2' instead of the project target framework '.NETCoreApp,Version=v9.0'. This project may not be fully compatible with your project.
@mmitche do you recall these errors from dotnet/arcade#12740 net10 templates are blocked |
@kasperk81 I think the Arcade issue is a red herring. When the tests are being run, the .NET SDK imports the Directory.Build.targets from the root of the SDK repo, which then imports the arcade targets. I am pretty sure this is not intended for template tests as they aren't really testing the simple create+restore flow. In a helix run, I don't think this ends up happening because the SDK's repo content isn't on the machine, so that's good. There is a /cc @nagilson and @marcpopMSFT |
these are persistent. when is nuget.config gets copied in artifacts? vmr is dotnet/arcade#15153 (comment) (need arcade bump, applies to all prs not just this one) |
@kasperk81 It's due to this change: That causes the targets in src/Tests/Microsoft.NET.TestFramework/SetupTestRoot.targets to not run. I think the conditionals in that file look pretty suspect. I'm guessing they were working around some race condition. |
dotnet-format uses NetCurrent right now. I think it should be using SdkTargetFramework |
Looks like it needs merge-from-main. |
The added patch should fix the wpf SDK mismatch issue but I wouldn't be surprised if that repo needs an additional change due to BCL changes. Let's see. |
Resolved by merging |
Hmm that one is annoying. The wpf repo builds with desktop msbuild. The VS version that is part of the build image is That VS installation seems to be missing dotnet/msbuild@7500f06 which updated the STJ binding redirects to 8.0.0.4. Apparently NuGet assemblies depend on the 8.0.0.4 version though. @rainersigwald ideas? Btw I'm not sure why the windows.vs2022.preview image is lagging behind so much. It would be great if it could get updated to a VS17.12 version. Filed dotnet/dnceng#4403 |
FWIW, there's a workaround shown at https://github.com/dotnet/core/blob/main/release-notes/9.0/known-issues.md#net-sdk-90100-rc1-will-fail-when-used-with-visual-studio-1711 |
OK lol, the workaround is broken with 10.0.100 SDK versions because dotnet-watch doesn't have a STJ assembly anymore: Submitted dotnet/arcade#15218 to update the workaround |
Now windowsdesktop (sigh). Still, all those failures are really helpful as they show us where our infrastructure could be improved. |
A bit thanks to our community contributors @am11 and @kasperk81 for helping getting this in. You are amazing! 🎉 |
…ion (#10030) * Keep apphostpack version in sync with targeting and runtime pack version Unblocks dotnet/sdk#43015 WPF uses a "live" version of the .NETCoreApp targeting and runtime pack. Also use the live version for the apphost pack so that vcxprojs don't depend on the version inside the SDK. * Update RuntimeFrameworkReference.targets * Create Tools.props * Update RuntimeFrameworkReference.targets * Update RuntimeFrameworkReference.targets * Update RuntimeFrameworkReference.targets * Update Tools.props * PR feedback and adding comments * Add more comments and consider version properties in conditions
Haha, classic move! Sometimes all it takes is a well-timed game-changing commit like |
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
No description provided.