Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 11, 2025

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.

Changes Made

Target Update in Microsoft.NET.Sdk.DefaultItems.targets:

  • Renamed target from _WarnWhenUsingNET9AndVSPriorTo1712 to _WarnWhenUsingNET10AndVSPriorTo18
  • Updated MSBuild version check from 17.12.0 to 18.0.0
  • Updated target framework version check from 9.0 to 10.0
  • Updated resource name from Net9NotCompatibleWithDev1711 to Net10NotCompatibleWithVS17

New Resource String:

  • Added NETSDK1229 message: "Targeting .NET 10.0 or higher in Visual Studio 2022 17.14 is not supported"
  • Added new message entry at the end of Strings.resx file following established patterns
  • Updated the "latest message added" comment to reference the new message

Localization:

  • Automatically generated entries for the new message across all supported localization files (XLF)

Warning Behavior

The warning will now appear when users attempt to build projects with:

  • MSBuild version < 18.0.0 AND
  • Targeting .NETCoreApp AND
  • Target framework version >= 10.0

This follows the same pattern established for previous .NET version compatibility warnings and ensures developers are informed when their tooling may not fully support the target framework version.

Fixes #50748.


💡 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.

- 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]>
@Copilot Copilot AI changed the title [WIP] Update compatibility message for trying to target net10.0 in 17.14 Update compatibility message for targeting .NET 10.0 in Visual Studio 17.14 Sep 11, 2025
Copilot finished work on behalf of marcpopMSFT September 11, 2025 00:22
@Copilot Copilot AI requested a review from marcpopMSFT September 11, 2025 00:22
@cremor
Copy link

cremor commented Sep 11, 2025

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).

@marcpopMSFT
Copy link
Member

@copilot change Net10NotCompatibleWithVS1713 to Net10NotCompatibleWithVS17, change _WarnWhenUsingNET10AndVSPriorTo1714 to _WarnWhenUsingNET10AndVSPriorTo18 and change the check to be 18.0.0

Copy link
Contributor Author

Copilot AI commented Sep 11, 2025

@copilot change Net10NotCompatibleWithVS1713 to Net10NotCompatibleWithVS17, change _WarnWhenUsingNET10AndVSPriorTo1714 to _WarnWhenUsingNET10AndVSPriorTo18 and change the check to be 18.0.0

Done! I've updated the code with all the requested changes:

  1. Changed Net10NotCompatibleWithVS1713 to Net10NotCompatibleWithVS17
  2. Changed _WarnWhenUsingNET10AndVSPriorTo1714 to _WarnWhenUsingNET10AndVSPriorTo18
  3. Updated the MSBuild version check from 17.14.0 to 18.0.0

The compatibility warning will now require Visual Studio 18.0 or higher for .NET 10.0 projects. Changes committed in ab74179.

@Copilot Copilot AI changed the title Update compatibility message for targeting .NET 10.0 in Visual Studio 17.14 Update compatibility message for targeting .NET 10.0 in Visual Studio 18.0 Sep 11, 2025
Copilot finished work on behalf of marcpopMSFT September 11, 2025 21:00
@cremor
Copy link

cremor commented Sep 12, 2025

The PR description still contradicts itself. Now the top is wrong and the bottom is correct. And the user facing message was not changed.

@marcpopMSFT
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update compatibility message for trying to target net10.0 in 17.14

4 participants