-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Cherry-pick PR #50749 to release/10.0.1xx: Update compatibility message for targeting .NET 10.0 in Visual Studio 17.14 #51366
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
Cherry-pick PR #50749 to release/10.0.1xx: Update compatibility message for targeting .NET 10.0 in Visual Studio 17.14 #51366
Conversation
… VS 18.0 Co-authored-by: marcpopMSFT <[email protected]>
|
I reviewed the changes closely and directed the copilot on actions. I haven't tested in a codespace as that's not supported but I can confirm we were getting the warnings when the check was 18.0.0 and aren't getting them now which aligns with a 17.15 msbuild in the preview image. I'll try building locally to test to confirm. |
|
Tested locally. Confirmed I don't get a warning when using msbuild 18 or dotnet build for 10 but do get a warning using 17.14 msbuild + local sdk setting DOTNET_MSBUILD_SDK_RESOLVER_SDKS_DIR. |
|
Approved offline for GA |
|
@marcpopMSFT to verify this fix, Nicole tried the following and she reported that no warning was shown.
You mentioned in the comments above that an additional local sdk setting DOTNET_MSBUILD_SDK_RESOLVER_SDKS_DIR is needed to verify this. Can you clarify why this setting is needed? And how will external customers see this warning if this additional setting is needed? cc: @NicoleWang001 |
|
No env variables should be required for testing with the official builds. That was just for testing the locally built version.
For that last step, you have to ensure that 17.14 is actually loading the 10 sdk. If it loads the 9 sdk, you'll get a different warning. Locally, I was struggling to get the 10 sdk to load when I launched VS through the OS. However, if I opened a 17.14 developer command prompt and used devenv, it worked. It also worked if I used msbuild to build the project from that developer command prompt. The loading of the net10 sdk into 17.14 launched from the OS is a separate issue than this bug. |
|
Thanks @marcpopMSFT, we got the expected warning with the latest .NET 10 GA build 10.0.100-rtm.25522.103 |



This PR cherry-picks the changes from PR #50749 to the
release/10.0.1xxbranch, updating the .NET SDK compatibility warning to alert users when targeting .NET 10.0 or higher with Visual Studio 2022 17.14 or earlier versions.Changes
Compatibility Warning
_WarnWhenUsingNET9AndVSPriorTo1712to_WarnWhenUsingNET10AndVSPriorTo1817.12.0to17.15.0(MSBuild was 17.15 during VS 18 previews)9.0to10.0Resource Strings
Net9NotCompatibleWithDev1711resource string (NETSDK1223)Net10NotCompatibleWithVS17resource string (NETSDK1233):CI/CD Pipeline
.vsts-ci.yml:windows.amd64.vs2022.pre→windows.amd64.vs2026.pre.scout.vsts-pr.yml:windows.amd64.vs2022.pre.open→windows.amd64.vs2026.pre.scout.openTest Updates
GivenThatWeHaveErrorCodes.csNativeAot_hw_runs_with_PackageReference_PublishAot_is_enabledIsAotCompatible_implies_enable_analyzers(with net5.0/net6.0/net7.0)NativeAot_compiler_runs_when_PublishAot_is_enabledTesting
Related
This ensures developers targeting .NET 10.0 receive appropriate warnings about Visual Studio version compatibility, helping them understand the minimum VS version required for proper .NET 10.0 development experience.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.