-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Error on unsupported Windows TargetPlatformVersion #12547
Conversation
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets
Outdated
Show resolved
Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetPlatforms.props
Outdated
Show resolved
Hide resolved
1c16974
to
42a8f90
Compare
|
||
<PropertyGroup> | ||
<TargetPlatformVersionSupported Condition="'$(TargetPlatformVersionSupported)' == '' and '@(ValidTargetPlatformVersion)' != ''" >true</TargetPlatformVersionSupported> | ||
<ValidTargetPlatformVersions Condition="'@(SupportedTargetPlatform)' != ''" >@(SupportedTargetPlatform, ', ')</ValidTargetPlatformVersions> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should be joined by newlines, because comma isn't the right separator character for all locales. Confirm with @wli3, if he thinks this is OK then go ahead with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comma is ok. But whitespace is better
@@ -193,6 +193,24 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
FormatArguments="$(MinimumOSPlatform);$(TargetPlatformVersion)"/> | |||
</Target> | |||
|
|||
<Target Name="_CheckForInvalidTargetPlatformVersion" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this interact with the invalid platform error? If you have an invalid platform and specify a TargetPlatformVersion, then we should only give you the invalid platform error, and not the invalid platform version error. Can you add a test case covering this?
Closing in favor of #12613 |
Fixes #12456