[release/6.0] WPF projects that use a versioned custom SDK fail to build #5536
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was approved for 6.0 GA over email. @ThomasGoulet73'a PR for main is here: #5426.
Fixes #5239
Description:
WPF projects that use a versioned custom SDK fail to build:
<Project Sdk="My.Custom.Sdk/1.2.3" />. Parse and add an explicit Version attribute when creating the temporary WPF .csproj.Customer Impact:
Any customer that requires a WPF project with a versioned custom SDK with SourceGenerator/PackageReference support will be blocked until this is fixed.
Regression:
Yes, partially. Using a custom SDK with a version works in 5.0 and 6.0 with PackageReference support turned off.
Testing:
Added/ran new unit tests and confirmed custom SDKs work with fix. Verified WPF Samples build against markup compiler containing change. Performed additional manual validation.
Risk:
Low. The Sdk attribute parsing uses the same public method from Microsoft.Build.Framework used by msbuild.