From b4c64b648d9267e9fa01fe1d56a35186fc6502ee Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Tue, 16 Jan 2018 11:20:22 -0600 Subject: [PATCH] No tfcompat check if ReferenceOutputAssembly=false 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 #2661 (and dotnet/sdk#939). --- src/Tasks/Microsoft.Common.CurrentVersion.targets | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Tasks/Microsoft.Common.CurrentVersion.targets b/src/Tasks/Microsoft.Common.CurrentVersion.targets index 5cb6b90a804..52120df29d5 100644 --- a/src/Tasks/Microsoft.Common.CurrentVersion.targets +++ b/src/Tasks/Microsoft.Common.CurrentVersion.targets @@ -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. --> - <_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and '%(Extension)' == '.vcxproj'"> + <_MSBuildProjectReferenceExistent + Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and + ('%(Extension)' == '.vcxproj' or '%(ReferenceOutputAssembly)' == 'false'"> true