Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

[release/2.0.0] Fix old project system warnings #713

Merged

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented Apr 19, 2018

When NETStandard.Library was referenced in a .NETFramework project using the old project system,
it would evaluate the project ignoring conditions on ItemGroups. Apparently this is done to
display the superset of project configurations (eg both debug and release) in the solution heirarchy.
The warnings were a result of the items never being resolved after design time build finished
resolving references (because of course the items were conditioned out for the target framework).

We can workaround this using choose/when. Apparently the evaluation of the project is bold
enough to ignore the conditions on an itemgroup, but not bold enough to choose one of many
when (or all) clauses. :)

Fixes #708

Release version of #710

ericstj added 2 commits April 18, 2018 08:50
When NETStandard.Library was referenced in a .NETFramework project using the old project system,
it would evaluate the project ignoring conditions on ItemGroups.  Apparently this is done to
display the superset of project configurations (eg both debug and release) in the solution heirarchy.
The warnings were a result of the items never being resolved after design time build finished
resolving references (because of course the items were conditioned out for the target framework).

We can workaround this using choose/when.  Apparently the evaluation of the project is bold
enough to ignore the conditions on an itemgroup, but not bold enough to choose one of many
when (or all) clauses. :)
We were appending an unnecessary slash after MSBuildThisFileDirectory in our targets.

This wasn't breaking anything but it should be cleaned up to avoid being a red-herring.
@ericstj ericstj requested a review from weshaggard April 19, 2018 15:29
@ericstj ericstj self-assigned this Apr 19, 2018
@ericstj
Copy link
Member Author

ericstj commented Apr 19, 2018

/cc @Petermarcu

@weshaggard
Copy link
Member

You should also bump the version of the package to 2.0.3

@Petermarcu
Copy link
Member

LGTM

@ericstj ericstj merged commit d23ee8a into dotnet:release/2.0.0 Apr 19, 2018
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