Skip to content

Commit

Permalink
Prevent outputpath from flowing to projectreferences
Browse files Browse the repository at this point in the history
Fixes dotnet#5420
SDK-side change still required
  • Loading branch information
Forgind committed Oct 28, 2020
1 parent 6605cdf commit 1775e5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Tasks/Microsoft.Common.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1831,14 +1831,19 @@ Copyright (C) Microsoft Corporation. All rights reserved.
much information as possible will be passed to the compilers.
-->

<PropertyGroup>
<MSBuildGlobalPropertiesToRemoveFromProjectReferences>%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)</MSBuildGlobalPropertiesToRemoveFromProjectReferences>
<MSBuildGlobalPropertiesToRemoveFromProjectReferences Condition="$(DoNotPassOutputPathToReferencedProjects)">%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove);OutputPath</MSBuildGlobalPropertiesToRemoveFromProjectReferences>
</PropertyGroup>

<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="GetTargetPath"
BuildInParallel="$(BuildInParallel)"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
Condition="'%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != ''"
ContinueOnError="!$(BuildingProject)"
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)">
RemoveProperties="$(MSBuildGlobalPropertiesToRemoveFromProjectReferences)">

<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" Condition="'%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)'=='true'"/>
<Output TaskParameter="TargetOutputs" ItemName="%(_MSBuildProjectReferenceExistent.OutputItemType)" Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' != ''"/>
Expand Down

0 comments on commit 1775e5c

Please sign in to comment.