Skip to content

Commit 57e3547

Browse files
authored
Update Calls to GetMrtPackagingOutput to follow the Project Reference protocol. (#1535)
* Update Calls to GetMrtPackagingOutput to follow the Project Reference protocol. * Update MrtCore.PriGen.targets * Update MrtCore.PriGen.targets * Update MrtCore.PriGen.targets
1 parent 6dc654d commit 57e3547

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

dev/MRTCore/packaging/MrtCore.PriGen.targets

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,31 +1196,33 @@
11961196
</PropertyGroup>
11971197

11981198
<MSBuild
1199-
Projects="@(ProjectReferenceWithConfiguration)"
1199+
Projects="@(_MSBuildProjectReferenceExistent)"
12001200
Targets="GetMrtPackagingOutputs"
12011201
BuildInParallel="$(BuildInParallel)"
1202-
Properties="%(ProjectReferenceWithConfiguration.SetConfiguration); %(ProjectReferenceWithConfiguration.SetPlatform)"
1203-
Condition="'@(ProjectReferenceWithConfiguration)' != ''
1204-
and '%(ProjectReferenceWithConfiguration.BuildReference)' == 'true'
1205-
and '%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == 'true'"
1202+
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
1203+
Condition="'@(_MSBuildProjectReferenceExistent)' != ''
1204+
and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'
1205+
and '%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)' == 'true'"
12061206
SkipNonexistentTargets="true"
1207-
ContinueOnError="$(_ContinueOnError)">
1207+
ContinueOnError="$(_ContinueOnError)"
1208+
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)">
12081209
<Output TaskParameter="TargetOutputs" ItemName="_PackagingOutputsFromOtherMrtCoreProjects"/>
12091210
</MSBuild>
12101211

12111212
<!-- The referenced project may not be using MRTCore. In that case, GetMrtPackagingOutputs won't be defined. However, if the
12121213
project is of type UWP, it'll have GetPackagingOutputs defined. So, try calling GetPackagingOutputs. If it does not exist,
12131214
we simply no-op - see the SkipNonexistentTargets parameter below. -->
12141215
<MSBuild
1215-
Projects="@(ProjectReferenceWithConfiguration)"
1216+
Projects="@(_MSBuildProjectReferenceExistent)"
12161217
Targets="GetPackagingOutputs"
12171218
BuildInParallel="$(BuildInParallel)"
1218-
Properties="%(ProjectReferenceWithConfiguration.SetConfiguration); %(ProjectReferenceWithConfiguration.SetPlatform)"
1219-
Condition="'@(ProjectReferenceWithConfiguration)' != ''
1220-
and '%(ProjectReferenceWithConfiguration.BuildReference)' == 'true'
1221-
and '%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == 'true'"
1219+
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform); %(_MSBuildProjectReferenceExistent.SetTargetFramework)"
1220+
Condition="'@(_MSBuildProjectReferenceExistent)' != ''
1221+
and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true'
1222+
and '%(_MSBuildProjectReferenceExistent.ReferenceOutputAssembly)' == 'true'"
12221223
SkipNonexistentTargets="true"
1223-
ContinueOnError="$(_ContinueOnError)">
1224+
ContinueOnError="$(_ContinueOnError)"
1225+
RemoveProperties="%(_MSBuildProjectReferenceExistent.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)">
12241226
<Output TaskParameter="TargetOutputs" ItemName="_PackagingOutputsFromOtherUwpProjects"/>
12251227
</MSBuild>
12261228

@@ -1306,8 +1308,9 @@
13061308
Projects="@(OptionalProjectBuildReferences)"
13071309
Targets="GetOptionalProjectOutputs"
13081310
BuildInParallel="$(BuildInParallel)"
1309-
Properties="%(OptionalProjectBuildReferences.SetConfiguration); %(OptionalProjectBuildReferences.SetPlatform)"
1310-
ContinueOnError="$(_ContinueOnError)">
1311+
Properties="%(OptionalProjectBuildReferences.SetConfiguration); %(OptionalProjectBuildReferences.SetPlatform); %(OptionalProjectBuildReferences.SetTargetFramework)"
1312+
ContinueOnError="$(_ContinueOnError)"
1313+
RemoveProperties="%(OptionalProjectBuildReferences.GlobalPropertiesToRemove)$(_GlobalPropertiesToRemoveFromProjectReferences)">
13111314
<Output TaskParameter="TargetOutputs" ItemName="_OptionalProjectOutputsFromOtherProjects"/>
13121315
</MSBuild>
13131316

0 commit comments

Comments
 (0)