-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fixes problems in WindowsDesktop SDK due to _TargetFrameworkVersionWithoutV being undefined sometimes #1713
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
Conversation
…etFrameworkVersion
…and fixup the default value in .targets file. Fixup an incorrect comment
… to Pbt.targets (used for dotnet/wpf builds only)
Marking as |
Hello @vatsan-madhavan! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@vatsan-madhavan - Do we know which .NET Core 3.0 sdk version will contain this change? |
This was merged 4 days ago - I would think that it would be already in the latest builds in https://github.com/dotnet/core-sdk. Have you had a chance to try out the latest build from there yet? |
I have tried 3.0.100-preview9-014004 which looks to be more recent than what is on core-sdk and that does not seem to include the fix yet. Will try one of the core-sdk builds. |
dotnet/core-sdk seem to have more recent versions of the .NET Core sdk: 3.0.100-rc1-014162 Using https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.0.1xx/dotnet-sdk-latest-osx-x64.pkg the fix does not yet seem to be included.
Presumably it will land in a later release. |
Tried out 3.0.100-rc2-014198 from dotnet/core-sdk and that includes these changes. Thanks. |
[release/3.0 version of #1707]
Fixes #1651 - Invalid comparison in MSBuild's ignore-conditions mode in outer build of multitargeted project
This change ensures that the WindowsDesktop SDK never deals with undefined numeric values related to TFM.
This solution leverages the fact that
Items
are evaluated afterProperties
by MSBuild. See Comparing properties and items_TargetFrameworkVersionValue
- a new Property which is defined for exclusive use within the WindowsDesktop SDK, and which is intended to act as a proxy for_TargetFrameworkVersionWithoutV
- is defined inMicrosoft.NET.Sdk.WindowsDesktop.targets
afterTargetFrameworkVersionWithoutV
is guaranteed to be defined byMicrosoft.NET.Sdk.targets
.Even here, we ensure that a fallback default (
0.0
) is provided - guaranteeing that_TargetFrameworkVersionValue
will always be numeric.When the
Condition
s in the variousItems
inMicrosoft.NET.WindowsDesktop.props
are evaluated (which will happen strictly after allProperties
are evaluated - whether they appear in.props
or.targets
),_TargetFrameworkVersionValue
would have been (a) well-defined and (b) guaranteed to be a numeric value. This would in turn guarantee that errors of the kind"A numeric comparison was attempted on "$(_TargetFrameworkVersionValue)" that evaluates to "" instead of a number,"
will no longer appear in outer-builds or in any other context.PS: This is a fix for a regression introduced by #1027 (which shipped in Preview 6) as part of a set of fixes for improving multi-targeting experience, improved warnings and error messages during build, and improvements to project-system integration.