Skip to content

Commit

Permalink
No tfcompat check if ReferenceOutputAssembly=false
Browse files Browse the repository at this point in the history
It is confusing to explicitly specify that you _don't_ want the output
of another project referenced in this project and then be told that the
output is incompatible.

This commit listens to the preexisting ProjectReference metadatum
ReferenceOutputAssembly and avoids the compatibility/best-match checks
on ProjectReferences that avoid the dependency.

Fixes dotnet#2661 (and dotnet/sdk#939).
  • Loading branch information
rainersigwald committed Jan 16, 2018
1 parent 5eb712c commit b4c64b6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Tasks/Microsoft.Common.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1543,9 +1543,15 @@ Copyright (C) Microsoft Corporation. All rights reserved.
We give this treatment to .vcxproj by default since no .vcxproj can target more
than one framework.
Likewise if the dependency is for build ordering instead of an assembly reference
(ReferenceOutputAssembly=false), skip the checks since we can't know what TF
the output would need to be compatible with.
-->
<ItemGroup>
<_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and '%(Extension)' == '.vcxproj'">
<_MSBuildProjectReferenceExistent
Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and
('%(Extension)' == '.vcxproj' or '%(ReferenceOutputAssembly)' == 'false'">
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</_MSBuildProjectReferenceExistent>
</ItemGroup>
Expand Down

0 comments on commit b4c64b6

Please sign in to comment.