-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update compatibility message for targeting .NET 10.0 in Visual Studio 18.0 #50749
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
base: main
Are you sure you want to change the base?
Conversation
- Update target name from _WarnWhenUsingNET9AndVSPriorTo1712 to _WarnWhenUsingNET10AndVSPriorTo1714 - Update condition to check for NET 10.0 and VS < 17.14.0 - Add new NETSDK1229 message for NET 10.0 compatibility warning - Update resource name to Net10NotCompatibleWithVS1713 - Update latest message added comment Co-authored-by: marcpopMSFT <[email protected]>
|
That PR description contradicts itself. At the very top it says "Visual Studio 2022 17.14 or earlier versions." while at the bottom it says "MSBuild version < 17.14.0". Also, why mention the minor version at all? If VS 2026/MSBuild 18 is required, just say "Targeting .NET 10.0 or higher in Visual Studio 2022 is not supported." (without mentioning any version number). |
|
@copilot change |
Co-authored-by: marcpopMSFT <[email protected]>
Done! I've updated the code with all the requested changes:
The compatibility warning will now require Visual Studio 18.0 or higher for .NET 10.0 projects. Changes committed in ab74179. |
|
The PR description still contradicts itself. Now the top is wrong and the bottom is correct. And the user facing message was not changed. |
… conflicts when flowing up
|
This change can't go in until we have VS 2026 previews in our hosting images so this'll have to wait for that, likely in GA. |
|
@copilot We now have VS 2026 images for running tests in helix. Please update to use "windows.amd64.vs2026.pre.scout.open" for public PRs and "windows.amd64.vs2026.pre.scout" in the .vsts-pr.yml and .vsts-ci.yml files, respectively. |
Co-authored-by: marcpopMSFT <[email protected]>
Updated both files to use the VS 2026 helix queues:
Changes committed in commit hash shown above. |
|
@copilot a few AOT tests appear to be having issues with the new dev18 image. Please disable the following for tests by skipping them and link to this issue in the skip message: #51361
|
|
@copilot VS 18 doesn't support targeting 4.5.2 anymore. Please update the following tests to target 4.6.2 anywhere they were targeting 4.5.2 before:
|
|
@copilot when removing a message, we have to update a test that checks for gaps in the error numbers. This PR removes NETSDK1223 so please update ThereAreNoGapsDuplicatesOrIncorrectlyFormattedCodes to account for that warning being removed. |
Skipped the four AOT tests that are failing on the VS 2026 image with a link to #51361. Changes committed in the commit shown above. |
Co-authored-by: marcpopMSFT <[email protected]>
|
@rainersigwald @dotnet/kitten I see the dev18 image is reporting |
Co-authored-by: marcpopMSFT <[email protected]>
Added 1223 to the
Updated both tests to target .NET Framework 4.6.2 instead of 4.5.2:
Changes committed in the commit shown above. |
|
Co-authored-by: marcpopMSFT <[email protected]>
Completed both requested changes:
Changes committed in the commit shown above. |
Early dev18 previews had a 17.15 msbuild version so use that as the check
… VS 18.0 Co-authored-by: marcpopMSFT <[email protected]>
I support this. |
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.
Pull Request Overview
This PR updates the .NET SDK compatibility warning system to alert users when targeting .NET 10.0 or higher with Visual Studio 2022 17.14 or earlier, replacing the previous .NET 9.0 warning for VS 2022 17.11.
Key changes:
- Updated MSBuild version check from 17.12.0 to 17.15.0 and target framework version from 9.0 to 10.0
- Changed error code from NETSDK1223 to NETSDK1233 to avoid conflicts
- Updated test infrastructure to use VS 2026 preview images
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Microsoft.NET.Sdk.DefaultItems.targets | Updates compatibility check target for .NET 10.0 with VS 17.15+ requirement |
| Strings.resx | Removes old NETSDK1223 resource and adds new NETSDK1233 compatibility message |
| Strings.*.xlf | Updates localization files with new compatibility message (marked as needing translation) |
| GivenThatWeHaveErrorCodes.cs | Adds NETSDK1223 to deleted error codes list |
| GivenThatWeWantToPublishAnAotApp.cs | Skips AOT tests due to VS 2026 image issues |
| GivenThatWeWantToBuildAWindowsRuntimeComponent.cs | Skips WinMD interop test due to VS 2026 image issues |
| GivenThatWeWantAutomaticTargetingPackReferences.cs | Updates test from .NET Framework 4.5.2 to 4.6.2 |
| GivenThatWeWantToReferenceAProject.cs | Updates test parameters from v4.5.2 to v4.6.2 for VS 18 compatibility |
| .vsts-pr.yml, .vsts-ci.yml | Updates helix test queues to use VS 2026 preview images |
| </Target> | ||
|
|
||
| <Target Name="_WarnWhenUsingNET9AndVSPriorTo1712" | ||
| <!-- MSBuild was 17.15 during previews for dev18 so require that or higher --> |
Copilot
AI
Oct 20, 2025
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.
The MSBuild version check of 17.15.0 is inconsistent with the error message mentioning Visual Studio 2022 17.14. The comment above explains that 'MSBuild was 17.15 during previews for dev18,' but the error message warns about VS 2022 17.14. Consider either updating the error message to reference MSBuild 17.15 or the version check to align with VS 2022 17.14, or adding a comment explaining this intentional version mismatch.
| <!-- MSBuild was 17.15 during previews for dev18 so require that or higher --> | |
| <!-- | |
| MSBuild was 17.15 during previews for dev18 so require that or higher. | |
| Note: The warning message references Visual Studio 2022 17.14, but the version check is for MSBuild 17.15.0. | |
| This is intentional because MSBuild 17.15 shipped in previews for dev18, while the last stable VS 2022 release was 17.14. | |
| The warning is shown for users with VS 2022 17.14 or earlier, but the actual check is for MSBuild 17.15.0 or higher. | |
| --> |
…ge for targeting .NET 10.0 in Visual Studio 17.14 (#51366)
Updates the .NET SDK compatibility warning to alert users when targeting .NET 10.0 or higher with Visual Studio 2022 17.14 or earlier versions.
_WarnWhenUsingNET9AndVSPriorTo1712to_WarnWhenUsingNET10AndVSPriorTo1817.12.0to18.0.09.0to10.0Net9NotCompatibleWithDev1711toNet10NotCompatibleWithVS17💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.