-
Notifications
You must be signed in to change notification settings - Fork 525
/
SkiaSharp.Build.WinUI.NetCore.targets
481 lines (409 loc) · 26.8 KB
/
SkiaSharp.Build.WinUI.NetCore.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<!-- Workarounds for WinUI -->
<Project>
<!--
BEGIN: Workaround for https://dev.azure.com/microsoft/OS/_workitems/edit/38897015
-->
<PropertyGroup>
<PriInitialPath Condition="'$(PriInitialPath)'==''">$(TargetName)</PriInitialPath>
</PropertyGroup>
<Target Name="_GenerateProjectPriConfigurationFiles"
Inputs="$(MSBuildAllProjects);@(_PriFile);$(AppxPriConfigXmlDefaultSnippetPath);@(PriOutputs)"
Outputs="$(_PriConfigXmlPath);$(_UnfilteredLayoutResfilesPath);$(_FilteredLayoutResfilesPath);$(_ExcludedLayoutResfilesPath);$(_ResourcesResfilesPath);$(_PriResfilesPath)"
DependsOnTargets="_GetDefaultResourceLanguage;_CopyOutOfDateSourceItemsToOutputDirectory">
<ItemGroup>
<_LayoutFileSource Include="@(PriOutputs)" Condition="'%(PriOutputs.OutputGroup)' == 'ContentFilesProjectOutputGroup' and '%(PriOutputs.ProjectName)' == '$(ProjectName)'" />
<_LayoutFileSource Include="@(PriOutputs)" Condition="'%(PriOutputs.OutputGroup)' == 'CustomOutputGroupForPackaging' and '%(PriOutputs.ProjectName)' == '$(ProjectName)'" />
<_LayoutFile Include="@(_LayoutFileSource)" Exclude="@(_AppxLayoutAssetPackageFiles)" />
<_EmbedFile Include="@(PriOutputs)" Condition="'%(PriOutputs.OutputGroup)' == 'EmbedOutputGroupForPackaging' and '%(PriOutputs.ProjectName)' == '$(ProjectName)'"/>
<_EmbedFileCopy Include="@(_EmbedFile->'$(IntermediateOutputPath)$(AppxSubfolderWithFilesToBeEmbedded)\%(TargetPath)')" />
<!-- If we have the .xbf we don't need the .xaml file-->
<_LayoutFileXbfXaml Include="$([System.IO.Path]::ChangeExtension('%(_EmbedFile.Identity)','.xaml'))" Condition="'%(Extension)' == '.xbf'" />
<_LayoutFile Remove="@(_LayoutFileXbfXaml)" />
</ItemGroup>
<WinAppSdkGeneratePriConfigurationFiles
UnfilteredLayoutResfilesPath="$(_UnfilteredLayoutResfilesPath)"
FilteredLayoutResfilesPath="$(_FilteredLayoutResfilesPath)"
ExcludedLayoutResfilesPath="$(_ExcludedLayoutResfilesPath)"
ResourcesResfilesPath="$(_ResourcesResfilesPath)"
PriResfilesPath="$(_PriResfilesPath)"
EmbedFileResfilePath="$(_EmbedFileResfilePath)"
LayoutFiles="@(_LayoutFile)"
PRIResourceFiles="@(PRIResource)"
PriFiles="@(_PriFile)"
EmbedFiles="@(_EmbedFile)"
IntermediateExtension="$(AppxIntermediateExtension)"
UnprocessedResourceFiles_OtherLanguages="@(_UnprocessedReswFiles_OtherLanguages)"
VsTelemetrySession="$(VsTelemetrySession)">
<Output TaskParameter="AdditionalResourceResFiles" ItemName="_AdditionalResourceResFiles" />
</WinAppSdkGeneratePriConfigurationFiles>
<WinAppSdkCreatePriConfigXmlForFullIndex
PriConfigXmlPath="$(_PriConfigXmlPath)"
LayoutResfilesPath="$(_FilteredLayoutResfilesPath)"
ResourcesResfilesPath="$(_ResourcesResfilesPath)"
PriResfilesPath="$(_PriResfilesPath)"
EmbedFileResfilePath="$(_EmbedFileResfilePath)"
PriInitialPath="$(AppxPriInitialPath)"
DefaultResourceLanguage="$(DefaultResourceLanguage)"
DefaultResourceQualifiers="$(AppxDefaultResourceQualifiers)"
IntermediateExtension="$(AppxIntermediateExtension)"
PriConfigXmlDefaultSnippetPath="$(AppxPriConfigXmlDefaultSnippetPath)"
TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
TargetPlatformVersion="$(TargetPlatformResourceVersion)"
AdditionalResourceResFiles="@(_AdditionalResourceResFiles)"
VsTelemetrySession="$(VsTelemetrySession)" />
<MakeDir Directories="$(IntermediateOutputPath)$(AppxSubfolderWithFilesToBeEmbedded)" />
<Copy SourceFiles="@(_EmbedFile)" DestinationFiles="@(_EmbedFileCopy)" SkipUnchangedFiles='true' />
<Message Text="$(MSBuildProjectName) -> $(_PriConfigXmlPath)" />
<Message Text="$(MSBuildProjectName) -> $(_UnfilteredLayoutResfilesPath)" />
<Message Text="$(MSBuildProjectName) -> $(_FilteredLayoutResfilesPath)" />
<Message Text="$(MSBuildProjectName) -> $(_ExcludedLayoutResfilesPath)" />
<Message Text="$(MSBuildProjectName) -> $(_ResourcesResfilesPath)" />
<Message Text="$(MSBuildProjectName) -> $(_PriResfilesPath)" />
<Message Text="$(MSBuildProjectName) -> $(_AdditionalResourceResFiles)" />
<Message Condition="'$(_SupportEmbedFileResources)' == 'true'" Text="$(MSBuildProjectName) -> $(_EmbedFileResfilePath)" />
</Target>
<Target Name="GetPackagingOutputs" Returns="@(PackagingOutputs)" DependsOnTargets="$(GetPackagingOutputsDependsOn)">
<PropertyGroup>
<!--
For .NET applications, we always need to include publish items output group, because this includes the exe. We ignore libraries since publish
is an application verb and library projects are built for AnyCPU, so including publish output groups will include native assets for every platform
instead of just the one being built for.
-->
<IncludePublishItemsOutputGroup Condition="'$(IncludePublishItemsOutputGroup)'=='' and '$(UsingMicrosoftNETSdk)'=='true' and '$(OutputType)'=='WinExe' ">true</IncludePublishItemsOutputGroup>
<IncludeBuiltProjectOutputGroup Condition="'$(IncludeBuiltProjectOutputGroup)' == ''">true</IncludeBuiltProjectOutputGroup>
<IncludeCopyLocalFilesOutputGroup Condition="'$(IncludeCopyLocalFilesOutputGroup)' == ''">true</IncludeCopyLocalFilesOutputGroup>
<IncludeContentFilesProjectOutputGroup Condition="'$(IncludeContentFilesProjectOutputGroup)' == ''">true</IncludeContentFilesProjectOutputGroup>
<IncludeDebugSymbolsProjectOutputGroup Condition="'$(IncludeDebugSymbolsProjectOutputGroup)' == ''">true</IncludeDebugSymbolsProjectOutputGroup>
<IncludeDocumentationProjectOutputGroup Condition="'$(IncludeDocumentationProjectOutputGroup)' == ''">false</IncludeDocumentationProjectOutputGroup>
<IncludeSatelliteDllsProjectOutputGroup Condition="'$(IncludeSatelliteDllsProjectOutputGroup)' == ''">false</IncludeSatelliteDllsProjectOutputGroup>
<IncludeSourceFilesProjectOutputGroup Condition="'$(IncludeSourceFilesProjectOutputGroup)' == ''">false</IncludeSourceFilesProjectOutputGroup>
<IncludeSGenFilesOutputGroup Condition="'$(IncludeSGenFilesOutputGroup)' == ''">false</IncludeSGenFilesOutputGroup>
<IncludeOptionalProjectsOutputGroup Condition="'$(IncludeOptionalProjectsOutputGroup)' == ''">true</IncludeOptionalProjectsOutputGroup>
<IncludeGetCopyToOutputDirectoryItemsOutputGroup Condition="'$(IncludeGetCopyToOutputDirectoryItemsOutputGroup)' == ''">true</IncludeGetCopyToOutputDirectoryItemsOutputGroup>
<IncludeComFilesOutputGroup Condition="'$(IncludeComFilesOutputGroup)' == ''">false</IncludeComFilesOutputGroup>
<IncludeCustomOutputGroupForPackaging Condition="'$(IncludeCustomOutputGroupForPackaging)' == ''">false</IncludeCustomOutputGroupForPackaging>
<IncludeCopyWinmdArtifactsOutputGroup Condition="'$(IncludeCopyWinmdArtifactsOutputGroup)' == ''">true</IncludeCopyWinmdArtifactsOutputGroup>
<IncludeSDKRedistOutputGroup Condition="'$(IncludeSDKRedistOutputGroup)' == ''">true</IncludeSDKRedistOutputGroup>
<IncludeGetResolvedSDKReferences Condition="'$(IncludeGetResolvedSDKReferences)' == ''">true</IncludeGetResolvedSDKReferences>
</PropertyGroup>
<CallTarget Targets="BuiltProjectOutputGroup" Condition="'$(IncludeBuiltProjectOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_BuiltProjectOutputGroupOutput"/>
</CallTarget>
<ItemGroup Condition="'$(PublishReadyToRun)'!='true'">
<_PackagingOutputsUnexpanded Include="%(_BuiltProjectOutputGroupOutput.FinalOutputPath)">
<TargetPath>%(_BuiltProjectOutputGroupOutput.TargetPath)</TargetPath>
<OutputGroup>BuiltProjectOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<!-- Ignore .dll files when PublishReadyToRun is set to true, otherwise we will get payload duplicate errors -->
<ItemGroup Condition="'$(PublishReadyToRun)'=='true'">
<_PackagingOutputsUnexpanded Include="%(_BuiltProjectOutputGroupOutput.FinalOutputPath)" Condition="'%(Extension)'!='.dll'">
<TargetPath>%(_BuiltProjectOutputGroupOutput.TargetPath)</TargetPath>
<OutputGroup>BuiltProjectOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="__GetPublishItems" Condition="'$(IncludePublishItemsOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_PublishItemsOutputGroupOutput" />
</CallTarget>
<ItemGroup>
<_PackagingOutputsUnexpanded Include="@(_PublishItemsOutputGroupOutput)">
<OutputGroup>PublishItemsOutputGroupOutput</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="DebugSymbolsProjectOutputGroup" Condition="'$(IncludeDebugSymbolsProjectOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_DebugSymbolsProjectOutputGroupOutput"/>
</CallTarget>
<ItemGroup>
<_PackagingOutputsUnexpanded Include="%(_DebugSymbolsProjectOutputGroupOutput.FinalOutputPath)">
<OutputGroup>DebugSymbolsProjectOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="DocumentationProjectOutputGroup" Condition="'$(IncludeDocumentationProjectOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_DocumentationProjectOutputGroupOutput"/>
</CallTarget>
<ItemGroup>
<_PackagingOutputsUnexpanded Include="@(_DocumentationProjectOutputGroupOutput)">
<OutputGroup>DocumentationProjectOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="SatelliteDllsProjectOutputGroup" Condition="'$(IncludeSatelliteDllsProjectOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_SatelliteDllsProjectOutputGroupOutput"/>
</CallTarget>
<ItemGroup>
<_PackagingOutputsUnexpanded Include="@(_SatelliteDllsProjectOutputGroupOutput)">
<OutputGroup>SatelliteDllsProjectOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="SourceFilesProjectOutputGroup" Condition="'$(IncludeSourceFilesProjectOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_SourceFilesProjectOutputGroupOutput"/>
</CallTarget>
<ItemGroup>
<_PackagingOutputsUnexpanded Include="@(_SourceFilesProjectOutputGroupOutput)">
<OutputGroup>SourceFilesProjectOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="SGenFilesOutputGroup" Condition="'$(IncludeSGenFilesOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_SGenFilesOutputGroupOutput"/>
</CallTarget>
<ItemGroup>
<_PackagingOutputsUnexpanded Include="@(_SGenFilesOutputGroupOutput)">
<OutputGroup>SGenFilesOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="CopyLocalFilesOutputGroup" Condition="'$(IncludeCopyLocalFilesOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_CopyLocalFilesOutputGroupOutput"/>
</CallTarget>
<ItemGroup Condition="'$(PublishReadyToRun)' != 'true'">
<_PackagingOutputsUnexpanded Include="@(_CopyLocalFilesOutputGroupOutput)" Condition="'%(Extension)'!='.pri'">
<OutputGroup>CopyLocalFilesOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<!-- Ignore .dll files when PublishReadyToRun is set to true, otherwise we will get payload duplicate errors -->
<ItemGroup Condition="'$(PublishReadyToRun)' == 'true'">
<_PackagingOutputsUnexpanded Include="@(_CopyLocalFilesOutputGroupOutput)" Condition="'%(Extension)'!='.pri' and '%(Extension)'!='.dll'">
<OutputGroup>CopyLocalFilesOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<!-- Include transitive items from ProjectReferences. See _GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences. -->
<CallTarget Targets="GetCopyToOutputDirectoryItemsOutputGroup" Condition="'$(IncludeGetCopyToOutputDirectoryItemsOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_GetCopyToOutputDirectoryItemsOutputGroupOutput"/>
</CallTarget>
<ItemGroup Condition="'$(IncludeGetCopyToOutputDirectoryItemsOutputGroup)' == 'true'">
<!-- If both XBF and XAML files are present, add only the XBF file to the package. -->
<_RedundantXaml Include="@(_GetCopyToOutputDirectoryItemsOutputGroupOutput->'%(RootDir)%(Directory)%(Filename).xaml')"
Condition="'%(Extension)'=='.xbf'" />
<_GetCopyToOutputDirectoryItemsOutputGroupOutput Remove="@(_RedundantXaml)" />
<_PackagingOutputsUnexpanded Include="@(_GetCopyToOutputDirectoryItemsOutputGroupOutput)">
<OutputGroup>GetCopyToOutputDirectoryItemsOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="ComFilesOutputGroup" Condition="'$(IncludeComFilesOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_ComFilesOutputGroupOutput"/>
</CallTarget>
<ItemGroup>
<_PackagingOutputsUnexpanded Include="@(_ComFilesOutputGroupOutput)">
<OutputGroup>ComFilesOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="CopyWinmdArtifactsOutputGroup" Condition="'$(IncludeCopyWinmdArtifactsOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_CopyWinmdArtifactsOutputGroupOutput"/>
</CallTarget>
<ItemGroup>
<_PackagingOutputsUnexpanded Include="@(_CopyWinmdArtifactsOutputGroupOutput)">
<OutputGroup>CopyWinmdArtifactsOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="SDKRedistOutputGroup" Condition="'$(IncludeSDKRedistOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_SDKRedistOutputGroupOutput"/>
</CallTarget>
<ItemGroup Condition="'$(AppxExcludeXbfFromSdkPayloadWhenXamlIsPresent)' == 'true'">
<!-- If extension SDK contains both XAML and XBF files, do not package XBF files from SDK -->
<_SDKRedistRedundantXBF Include="@(_SDKRedistOutputGroupOutput->'%(RootDir)%(Directory)%(Filename).xbf')"
Condition="'%(Extension)'=='.xaml'" />
<_SDKRedistOutputGroupOutput Remove="@(_SDKRedistRedundantXBF)" />
</ItemGroup>
<ItemGroup>
<_PackagingOutputsUnexpanded Include="@(_SDKRedistOutputGroupOutput)">
<OutputGroup>SDKRedistOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PackagingOutputsUnexpanded>
<_PackagingOutputsUnexpanded Remove="@(RemoveSdkFilesFromAppxPackage)" />
</ItemGroup>
<ItemGroup Condition="'$(DisableEmbeddedXbf)' != 'true'">
<_PackagingOutputsUnexpanded Include="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(_CustomOutputGroupForPackagingOutput.ReferenceSourceTarget)' == 'ExpandSDKReference'">
<OutputGroup>SDKRedistOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
<TargetPath Condition="'$(AppxPackage)' != 'true' and '$(AppxPriInitialPath)' != ''">$(AppxPriInitialPath)\%(_CustomOutputGroupForPackagingOutput.TargetPath)</TargetPath>
</_PackagingOutputsUnexpanded>
<_CustomOutputGroupForPackagingOutput Remove="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(_CustomOutputGroupForPackagingOutput.ReferenceSourceTarget)' == 'ExpandSDKReference'"/>
</ItemGroup>
<WinAppSdkExpandPayloadDirectories Inputs="@(_PackagingOutputsUnexpanded)" VsTelemetrySession="$(VsTelemetrySession)">
<Output TaskParameter="Expanded" ItemName="_PackagingOutputsExpanded" />
</WinAppSdkExpandPayloadDirectories>
<CallTarget Targets="GetResolvedSDKReferences" Condition="'$(IncludeGetResolvedSDKReferences)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_GetResolvedSDKReferencesOutputWithoutMetadata"/>
</CallTarget>
<ItemGroup>
<_GetResolvedSDKReferencesOutput Include="@(_GetResolvedSDKReferencesOutputWithoutMetadata)">
<OutputGroup>GetResolvedSDKReferences</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_GetResolvedSDKReferencesOutput>
</ItemGroup>
<CallTarget Targets="_GetProjectArchitecture">
<Output TaskParameter="TargetOutputs" ItemName="_ProjectArchitecture" />
</CallTarget>
<ItemGroup>
<_ProjectArchitectureItem Include="@(_ProjectArchitecture)">
<OutputGroup>_GetProjectArchitecture</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_ProjectArchitectureItem>
</ItemGroup>
<PropertyGroup>
<_ContinueOnError Condition="'$(BuildingProject)' == 'true'">false</_ContinueOnError>
<_ContinueOnError Condition="'$(BuildingProject)' != 'true'">true</_ContinueOnError>
</PropertyGroup>
<MSBuild
Projects="@(ProjectReferenceWithConfiguration)"
Targets="GetPackagingOutputs"
BuildInParallel="$(BuildInParallel)"
Properties="%(ProjectReferenceWithConfiguration.SetConfiguration); %(ProjectReferenceWithConfiguration.SetPlatform)"
Condition="'@(ProjectReferenceWithConfiguration)' != ''
and '%(ProjectReferenceWithConfiguration.BuildReference)' == 'true'
and '%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == 'true'"
ContinueOnError="$(_ContinueOnError)">
<Output TaskParameter="TargetOutputs" ItemName="_PackagingOutputsFromOtherProjects"/>
</MSBuild>
<ItemGroup>
<_PackagingOutputsOutsideLayout Include="@(ProjectPriFile)" />
<_PackagingOutputsOutsideLayout Include="@(_PackagingOutputsExpanded)" />
<_PackagingOutputsOutsideLayout Include="@(PriOutputs)" />
<_PackagingOutputsOutsideLayout Include="@(_GetResolvedSDKReferencesOutput)" />
<!-- Exclude any PRIOutputs that come from other projects so we avoid duplicates -->
<_PackagingOutputsOutsideLayout Include="@(_PackagingOutputsFromOtherProjects)" Exclude="@(PriOutputs)"/>
</ItemGroup>
<ItemGroup>
<PathsToExcludeFromLayoutOutputGroup Include="@(_PackagingOutputsOutsideLayout->'%(TargetPath)')" />
<PathsToExcludeFromLayoutOutputGroup Include="$(AppxManifestTargetPath)" />
<PathsToExcludeFromLayoutOutputGroup Include="$(DeploymentRecipeTargetPath)" />
</ItemGroup>
<ItemGroup>
<DirsToExcludeFromLayoutOutputGroup Include="$(WinMetadataDir)" />
<DirsToExcludeFromLayoutOutputGroup Include="$(EntryPointDir)" />
</ItemGroup>
<WinAppSdkExpandPayloadDirectories Condition="'$(IncludeLayoutFilesInPackage)' == 'true'" Inputs="$(LayoutDir)" TargetDirsToExclude="@(DirsToExcludeFromLayoutOutputGroup)" TargetFilesToExclude="@(PathsToExcludeFromLayoutOutputGroup)" VsTelemetrySession="$(VsTelemetrySession)">
<Output TaskParameter="Expanded" ItemName="_PackagingOutputsFromLayout" />
</WinAppSdkExpandPayloadDirectories>
<ItemGroup>
<PackagingOutputs Include="@(_PackagingOutputsFromLayout)">
<ProjectName>$(ProjectName)</ProjectName>
<OutputGroup>LayoutOutputGroup</OutputGroup>
</PackagingOutputs>
<PackagingOutputs Include="@(_PackagingOutputsOutsideLayout)" />
<PackagingOutputs Include="@(_ProjectArchitectureItem)" />
</ItemGroup>
<!-- Remove all .xaml files from the payload that correlate with a .xbf file -->
<ItemGroup>
<_PackagingOutputsXbfXaml Include="$([System.IO.Path]::ChangeExtension('%(PackagingOutputs.Identity)','.xaml'))" Condition="'%(Extension)' == '.xbf'" />
<PackagingOutputs Remove="@(_PackagingOutputsXbfXaml)" />
</ItemGroup>
</Target>
<Target Name="GetPriOutputs"
Condition="'$(AppxGeneratePriEnabled)'=='true'"
Returns="@(PriOutputs);@(ProjectPriFile)"
DependsOnTargets="$(GetPriOutputsDependsOn)">
<PropertyGroup>
<IncludePriFilesOutputGroup Condition="'$(IncludePriFilesOutputGroup)' == ''">true</IncludePriFilesOutputGroup>
<IncludeProjectPriFile Condition="'$(IncludeProjectPriFile)' == ''">true</IncludeProjectPriFile>
<IncludeCopyLocalFilesOutputGroup Condition="'$(IncludeCopyLocalFilesOutputGroup)' == ''">true</IncludeCopyLocalFilesOutputGroup>
<IncludeContentFilesProjectOutputGroup Condition="'$(IncludeContentFilesProjectOutputGroup)' == ''">true</IncludeContentFilesProjectOutputGroup>
<IncludeCustomOutputGroupForPackaging Condition="'$(IncludeCustomOutputGroupForPackaging)' == ''">false</IncludeCustomOutputGroupForPackaging>
</PropertyGroup>
<CallTarget Targets="PriFilesOutputGroup" Condition="'$(IncludePriFilesOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_PriFilesOutputGroupOutput"/>
</CallTarget>
<CallTarget Targets="CopyLocalFilesOutputGroup" Condition="'$(IncludeCopyLocalFilesOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_CopyLocalFilesOutputGroupOutput"/>
</CallTarget>
<ItemGroup>
<_PriOutputsUnexpanded Include="@(_CopyLocalFilesOutputGroupOutput)" Condition="'%(Extension)'=='.pri'">
<OutputGroup>CopyLocalFilesOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PriOutputsUnexpanded>
</ItemGroup>
<ItemGroup>
<_PriOutputsUnexpanded Include="@(_PriFilesOutputGroupOutput)">
<OutputGroup>PriFilesOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
</_PriOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="ContentFilesProjectOutputGroup" Condition="'$(IncludeContentFilesProjectOutputGroup)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_ContentFilesProjectOutputGroupOutput"/>
</CallTarget>
<ItemGroup>
<_PriOutputsUnexpanded Include="@(_ContentFilesProjectOutputGroupOutput)">
<OutputGroup>ContentFilesProjectOutputGroup</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
<TargetPath Condition="'$(AppxPackage)' != 'true' and '$(AppxPriInitialPath)' != ''">$(AppxPriInitialPath)\%(_ContentFilesProjectOutputGroupOutput.TargetPath)</TargetPath>
</_PriOutputsUnexpanded>
</ItemGroup>
<CallTarget Targets="CustomOutputGroupForPackaging" Condition="'$(IncludeCustomOutputGroupForPackaging)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_CustomOutputGroupForPackagingOutput"/>
</CallTarget>
<ItemGroup>
<_PriOutputsUnexpanded Include="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(Extension)' != '.xbf'">
<OutputGroup>CustomOutputGroupForPackaging</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
<TargetPath Condition="'$(AppxPackage)' != 'true' and '$(AppxPriInitialPath)' != ''">$(AppxPriInitialPath)\%(_CustomOutputGroupForPackagingOutput.TargetPath)</TargetPath>
</_PriOutputsUnexpanded>
<_PriOutputsUnexpanded Include="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(Extension)' == '.xbf' AND '$(_SupportXbfAsEmbedFileResources)' != 'true'">
<OutputGroup>CustomOutputGroupForPackaging</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
<TargetPath Condition="'$(AppxPackage)' != 'true' and '$(AppxPriInitialPath)' != ''">$(AppxPriInitialPath)\%(_CustomOutputGroupForPackagingOutput.TargetPath)</TargetPath>
</_PriOutputsUnexpanded>
<_PriOutputsUnexpanded Include="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(Extension)' == '.xbf' AND '$(_SupportXbfAsEmbedFileResources)' == 'true'">
<OutputGroup>EmbedOutputGroupForPackaging</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
<TargetPath Condition="'$(AppxPackage)' != 'true' and '$(AppxPriInitialPath)' != ''">$(AppxPriInitialPath)\%(_CustomOutputGroupForPackagingOutput.TargetPath)</TargetPath>
</_PriOutputsUnexpanded>
</ItemGroup>
<WinAppSdkExpandPayloadDirectories Inputs="@(_PriOutputsUnexpanded)" VsTelemetrySession="$(VsTelemetrySession)">
<Output TaskParameter="Expanded" ItemName="_PriOutputsExpanded" />
</WinAppSdkExpandPayloadDirectories>
<ItemGroup>
<ProjectPriFile Include="$(ProjectPriFullPath)" Condition="'$(IncludeProjectPriFile)' == 'true'">
<OutputGroup>ProjectPriFile</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
<TargetPath>$(ProjectPriFileName)</TargetPath>
</ProjectPriFile>
</ItemGroup>
<ItemGroup Condition="'$(BuildAppxUploadPackageForUap)' == 'true'">
<ProjectPriUploadFile Include="$(ProjectPriUploadFullPath)" Condition="'$(IncludeProjectPriFile)' == 'true'">
<OutputGroup>ProjectPriUploadFile</OutputGroup>
<ProjectName>$(ProjectName)</ProjectName>
<TargetPath>$(ProjectPriFileName)</TargetPath>
</ProjectPriUploadFile>
</ItemGroup>
<PropertyGroup>
<_ContinueOnError Condition="'$(BuildingProject)' == 'true'">false</_ContinueOnError>
<_ContinueOnError Condition="'$(BuildingProject)' != 'true'">true</_ContinueOnError>
</PropertyGroup>
<MSBuild
Projects="@(ProjectReferenceWithConfiguration)"
Targets="GetPriOutputs"
SkipNonexistentTargets="true"
BuildInParallel="$(BuildInParallel)"
Properties="%(ProjectReferenceWithConfiguration.SetConfiguration); %(ProjectReferenceWithConfiguration.SetPlatform)"
Condition="'@(ProjectReferenceWithConfiguration)' != ''
and '%(ProjectReferenceWithConfiguration.BuildReference)' == 'true'
and '%(ProjectReferenceWithConfiguration.ReferenceOutputAssembly)' == 'true'"
ContinueOnError="$(_ContinueOnError)">
<Output TaskParameter="TargetOutputs" ItemName="_PriOutputsFromOtherProjects"/>
</MSBuild>
<ItemGroup>
<PriOutputs Include="@(_PriOutputsExpanded)" />
<PriOutputs Include="@(_PriOutputsFromOtherProjects)" />
</ItemGroup>
<!-- Remove all .xaml files that correlate with a .xbf file -->
<ItemGroup>
<_PriOutputsXbfXaml Include="$([System.IO.Path]::ChangeExtension('%(PriOutputs.Identity)','.xaml'))" Condition="'%(Extension)' == '.xbf'" />
<PriOutputs Remove="@(_PriOutputsXbfXaml)" />
</ItemGroup>
<Message Text="$(ProjectName) : %(PriOutputs.ProjectName).%(PriOutputs.OutputGroup) : %(PriOutputs.Identity) -> %(PriOutputs.TargetPath)" />
</Target>
<!--
END: Workaround for https://dev.azure.com/microsoft/OS/_workitems/edit/38897015
-->
</Project>