Disable NETFX WinFX targets only when the SDK is used directly#4630
Merged
ryalanms merged 1 commit intodotnet:mainfrom Jun 4, 2021
Merged
Disable NETFX WinFX targets only when the SDK is used directly#4630ryalanms merged 1 commit intodotnet:mainfrom
ryalanms merged 1 commit intodotnet:mainfrom
Conversation
Only when the Windows Desktop SDK is used directly instead! Example: ```xml -<Project Sdk="Microsoft.NET.Sdk" /> +<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop" /> ```
This was referenced Jun 4, 2021
dsplaisted
approved these changes
Jun 4, 2021
Member
|
Thanks, @Nirmal4G. |
ryalanms
approved these changes
Jun 4, 2021
This was referenced Jul 20, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Partially Fixes #4515
Partially Fixes dotnet/sdk#18062
Description
Disable .NET Framework's WinFX targets import only when the Windows Desktop SDK is used directly instead!
Example:
Here, we're simply moving the logic to the
Sdk.props. This still does not fix the root of the problemwhere the SDK provided WinFX targets should work properly when targeting .NET Framework only projects.
Customer Impact
As per the issues mentioned above, the .NET Framework projects that depends on older inbox WinFX targets no longer used those targets and so, the build fails.
Regression
Yes, it was a regression due to behavior of WinFX imports in both Common targets and the Desktop SDK that revealed itself through #2976.
Testing
Works when tested locally.
Risk
Low, since the .NET 6 is still in preview.
It only fixes when the SDK used is .NET SDK instead of Windows Desktop SDK. Since .NET SDK in post 5.0 imports
WindowsDesktop.propsand so, we simply move the logic toSdk.props. So, for those who depends on this behaviorshould use Windows Desktop SDK instead of the Main SDK, as shown above.