Skip to content

Conversation

@ryalanms
Copy link
Member

@ryalanms ryalanms commented Oct 18, 2021

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.

@ryalanms ryalanms requested a review from a team as a code owner October 18, 2021 23:19
@ryalanms ryalanms changed the title WPF projects that use a versioned custom SDK fail to build [release/6.0] WPF projects that use a versioned custom SDK fail to build Oct 18, 2021
@ryalanms
Copy link
Member Author

@singhashish-wpf: I'd like to continue testing until the GA snap deadline at 8pm. Please do not merge until then.

* Fix build when using and SDK that comes from a PackageReference

* Update custom Sdk attribute version parsing to match msbuild

* Use SdkReference.TryParse

Co-authored-by: Ryland <41491307+ryalanms@users.noreply.github.com>
@ryalanms ryalanms merged commit d37c1f5 into release/6.0 Oct 19, 2021
@vishalmsft vishalmsft deleted the custom.sdk.fix branch February 15, 2022 05:34
@ghost ghost locked as resolved and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants