-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add conditions for implicit framework references for .NET 3.5 and below #561
Conversation
@@ -77,18 +77,18 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
</PropertyGroup> | |||
|
|||
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETFramework'"> | |||
<!-- When doing greater than/less than comparisons between strings, MSBuild will try to parse the strings as Version objects and compare them as |
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.
Separate item groups with conditions would be clearer.
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.
There's already a condition on the item group: Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETFramework'"
So splitting into separate item groups based on the target framework version would mean duplicating that condition and adding an additional clause for the version. I don't think that would end up being clearer.
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.
Then manually group by similar conditions?
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.
OK, Done
…T they were added in
Shouldn't a similar set of changes be included for the Xamarin platforms? They need/should have implicit references added as well to match, plus their platform lib |
Merge release/3.0.1xx to master
Fixes #532
There aren't any tests for this, as we run all our tests using the .NET CLI version of MSBuild, which doesn't support targeting .NET 3.5 and lower (as there are no reference assemblies for these frameworks).