-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Microsoft.WinFX.targets
998 lines (736 loc) · 46.7 KB
/
Microsoft.WinFX.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
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PresentationBuildTasksTfm Condition="'$(MSBuildRuntimeType)' == 'Core'">netcoreapp2.1</_PresentationBuildTasksTfm>
<_PresentationBuildTasksTfm Condition="'$(MSBuildRuntimeType)' != 'Core'">net472</_PresentationBuildTasksTfm>
<_PresentationBuildTasksAssembly Condition="'$(_PresentationBuildTasksAssembly)'==''">$([MSBuild]::Unescape($([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\tools\$(_PresentationBuildTasksTfm)\PresentationBuildTasks.dll'))))</_PresentationBuildTasksAssembly>
</PropertyGroup>
<UsingTask TaskName="Microsoft.Build.Tasks.Windows.MarkupCompilePass1" AssemblyFile="$(_PresentationBuildTasksAssembly)" />
<UsingTask TaskName="Microsoft.Build.Tasks.Windows.UidManager" AssemblyFile="$(_PresentationBuildTasksAssembly)" />
<UsingTask TaskName="Microsoft.Build.Tasks.Windows.ResourcesGenerator" AssemblyFile="$(_PresentationBuildTasksAssembly)" />
<UsingTask TaskName="Microsoft.Build.Tasks.Windows.FileClassifier" AssemblyFile="$(_PresentationBuildTasksAssembly)" />
<UsingTask TaskName="Microsoft.Build.Tasks.Windows.MarkupCompilePass2" AssemblyFile="$(_PresentationBuildTasksAssembly)" />
<UsingTask TaskName="Microsoft.Build.Tasks.Windows.GenerateTemporaryTargetAssembly" AssemblyFile="$(_PresentationBuildTasksAssembly)" />
<UsingTask TaskName="Microsoft.Build.Tasks.Windows.MergeLocalizationDirectives" AssemblyFile="$(_PresentationBuildTasksAssembly)" />
<PropertyGroup>
<AlwaysCompileMarkupFilesInSeparateDomain Condition="'$(BuildingInsideVisualStudio)' == 'true' and '$(AlwaysCompileMarkupFilesInSeparateDomain)' == ''">true</AlwaysCompileMarkupFilesInSeparateDomain>
<AlwaysCompileMarkupFilesInSeparateDomain Condition="'$(AlwaysCompileMarkupFilesInSeparateDomain)' == '' ">true</AlwaysCompileMarkupFilesInSeparateDomain>
<LocalizationDirectivesToLocFile Condition="'$(LocalizationDirectivesToLocFile)' == ''">None</LocalizationDirectivesToLocFile>
</PropertyGroup>
<!-- Some Default Settings -->
<PropertyGroup>
<!--
XamlDebuggingInformation property controls whether or not to put line number information in the
generated binary file for a Xaml markup file.
If XamlDebuggingInformation is set in project file, take whatever setting.
If XamlDebuggingInformation property is not explicitly set, and the current build is for debug,
Set true to XamlDebuggingInformation, if the build is not for Debug, keep the empty setting for
XamlDebuggingInformation, it means not to put line number information in the generated binary file.
-->
<XamlDebuggingInformation Condition="'$(XamlDebuggingInformation)' == '' and '$(ConfigurationName)' == 'Debug'">true</XamlDebuggingInformation>
<HostInBrowser Condition="'$(HostInBrowser)'==''">false</HostInBrowser>
<Version Condition="'$(Version)'==''">1.0.0.0</Version>
<DeploymentType Condition="'$(DeploymentType)'==''">Installed</DeploymentType>
<RunAfterInstall Condition="'$(RunAfterInstall)'==''">true</RunAfterInstall>
<GeneratedFileExtension>.g$(DefaultLanguageSourceExtension)</GeneratedFileExtension>
<OSVersion Condition="'$(OSVersion)' == ''">5.1.2600.0</OSVersion>
<!-- Initialize some Local-Type_Ref related properties -->
<_RequireMCPass2ForSatelliteAssemblyOnly>false</_RequireMCPass2ForSatelliteAssemblyOnly>
<_RequireMCPass2ForMainAssembly>false</_RequireMCPass2ForMainAssembly>
</PropertyGroup>
<PropertyGroup>
<IsApplication Condition="'$(OutputType)'=='exe'">true</IsApplication>
<IsApplication Condition="'$(OutputType)'=='winexe'">true</IsApplication>
<IsLibrary Condition="'$(OutputType)'=='library'">true</IsLibrary>
<IsLibrary Condition="'$(OutputType)'=='module'">true</IsLibrary>
</PropertyGroup>
<PropertyGroup>
<!--
Inject AssignWinFXEmbeddedResource target at right stage.
-->
<PrepareResourceNamesDependsOn>
AssignWinFXEmbeddedResource;
$(PrepareResourceNamesDependsOn)
</PrepareResourceNamesDependsOn>
</PropertyGroup>
<!-- Common Application and Library Property settings -->
<PropertyGroup>
<PrepareResourcesDependsOn>
MarkupCompilePass1;
AfterMarkupCompilePass1;
MarkupCompilePass2ForMainAssembly;
FileClassification;
MainResourcesGeneration;
$(PrepareResourcesDependsOn)
</PrepareResourcesDependsOn>
</PropertyGroup>
<PropertyGroup>
<!-- Add Markup compilation to the CoreCompileDependsOn so that the IDE inproc compilers (particularly VB)
can "see" the generated source files. -->
<CoreCompileDependsOn Condition="'$(BuildingInsideVisualStudio)' == 'true' ">
DesignTimeMarkupCompilation;
$(CoreCompileDependsOn)
</CoreCompileDependsOn>
</PropertyGroup>
<Target Name="DesignTimeMarkupCompilation">
<!-- Only if we are not actually performing a compile i.e. we are in design mode -->
<CallTarget Condition="'$(BuildingProject)' != 'true' Or $(DesignTimeBuild) == 'true'"
Targets="MarkupCompilePass1" />
</Target>
<!-- WinFX specific ItemGroup -->
<ItemGroup Condition="'$(BuildingInsideVisualStudio)'=='true'">
<!--
Add WinFX specific Item names to AvailableItemName item, so that they can show up
in a drop-down menu for Build Action field of the properties window in VisualStudio.
-->
<AvailableItemName Include="ApplicationDefinition" />
<AvailableItemName Include="Page" />
<AvailableItemName Include="Resource" />
<AvailableItemName Include="SplashScreen" />
<AvailableItemName Include="DesignData" />
<AvailableItemName Include="DesignDataWithDesignTimeCreatableTypes" />
</ItemGroup>
<!--
Prepare Resource For SatelliteAssemblies.
-->
<PropertyGroup Condition="'$(UICulture)' != ''" >
<PrepareResourcesForSatelliteAssembliesDependsOn>
SatelliteOnlyMarkupCompilePass2;
SatelliteResourceGeneration;
GenerateResourceWithCultureItem;
</PrepareResourcesForSatelliteAssembliesDependsOn>
</PropertyGroup>
<Target Name="PrepareResourcesForSatelliteAssemblies"
Condition="'$(UICulture)' != ''"
DependsOnTargets="$(PrepareResourcesForSatelliteAssembliesDependsOn)" >
</Target>
<PropertyGroup>
<!--
Hook up AfterCompileWinFX to that it runs
where AfterCompile would have run
-->
<CompileDependsOn>
$(CompileDependsOn);
_AfterCompileWinFXInternal
</CompileDependsOn>
<!--
Any targets that _AfterCompileWinFXInternal depends on.
After the xaml file is compiled, the build system needs to generate a final .loc file
for localization support. MergeLocalizationDirectives target does this.
If UICulture is set, it needs to do below extra work before generating the .loc file:
1. Calls the MarkupCompilePass2 for those xaml file which reference local types.
2. Generate the .resources for given culture from .baml and other resource files.
Target PrepareResourcesForSatelliteAssemblies is for this.
-->
<_AfterCompileWinFXInternalDependsOn>
PrepareResourcesForSatelliteAssemblies;
MergeLocalizationDirectives;
AfterCompileWinFX
</_AfterCompileWinFXInternalDependsOn>
</PropertyGroup>
<!-- Work that we want to be done after the "Compile" target in Microsoft.Common.targets -->
<Target Name="_AfterCompileWinFXInternal" DependsOnTargets="$(_AfterCompileWinFXInternalDependsOn)" />
<!--
===========================================================================================
Extensibility Points
Redefine these targets in your project in order to run tasks just after
MarkupCompilePass1, MarkupCompilePass2 or the entire WinFXCompile.
===========================================================================================
-->
<Target Name="AfterCompileWinFX"/>
<Target Name="AfterMarkupCompilePass1" />
<Target Name="AfterMarkupCompilePass2" />
<!--
Name : MarkupCompilePass1
This target generates code for every xaml file as well it also generates code for main and IResourceLoader.
This target uses MarkupCompilePass1 task.
-->
<!--
================================================================
MarkupCompilePass1
================================================================
-->
<Target Name="MarkupCompilePass1"
DependsOnTargets="$(MarkupCompilePass1DependsOn);SplashScreenValidation"
Condition="'@(Page)' != '' or '@(ApplicationDefinition)' != '' " >
<Message Text="(in) Page: '@(Page)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(in) ApplicationDefinition: '@(ApplicationDefinition)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(in) Resource: '@(Resource)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(in) CodeGenReference: '@(ReferencePath)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<!--
When performing an intellisense compile, we don't want to abort the compile if
MarkupCompilePass1 fails. This would prevent the list of files from being handed
off to the compiler, thereby breaking all intellisense. For intellisense compiles
we set ContinueOnError to true. The property defined here is used as the value
for ContinueOnError on the MarkupCompilePass1 task.
-->
<PropertyGroup>
<_IntellisenseOnlyCompile>false</_IntellisenseOnlyCompile>
<_IntellisenseOnlyCompile Condition="'$(BuildingProject)' != 'true'">true</_IntellisenseOnlyCompile>
</PropertyGroup>
<MarkupCompilePass1
Language="$(Language)"
UICulture="$(UICulture)"
ApplicationMarkup="@(ApplicationDefinition)"
SplashScreen="@(SplashScreen)"
LanguageSourceExtension="$(DefaultLanguageSourceExtension)"
PageMarkup="@(Page)"
ContentFiles="@(Content)"
AssemblyName="$(AssemblyName)"
OutputType="$(OutputType)"
AssemblyVersion="$(AssemblyVersion)"
AssemblyPublicKeyToken="$(AssemblyPublicKeyToken)"
References="@(ReferencePath)"
RootNamespace="$(RootNamespace)"
KnownReferencePaths="$(MSBuildBinPath);$(TargetFrameworkDirectory);@(_TargetFrameworkSDKDirectoryItem);@(KnownReferencePaths)"
AssembliesGeneratedDuringBuild="@(AssembliesGeneratedDuringBuild)"
AlwaysCompileMarkupFilesInSeparateDomain="$(AlwaysCompileMarkupFilesInSeparateDomain)"
HostInBrowser="$(HostInBrowser)"
LocalizationDirectivesToLocFile="$(LocalizationDirectivesToLocFile)"
ContinueOnError="$(_IntellisenseOnlyCompile)"
SourceCodeFiles="@(Compile)"
DefineConstants="$(DefineConstants)"
ExtraBuildControlFiles="@(ExtraBuildControlFiles)"
XamlDebuggingInformation="$(XamlDebuggingInformation)"
IsRunningInVisualStudio="$(BuildingInsideVisualStudio)"
OutputPath="$(IntermediateOutputPath)"
SupportCustomOutputPaths="$(IncludePackageReferencesDuringMarkupCompilation)">
<Output ItemName="GeneratedBaml" TaskParameter="GeneratedBamlFiles"/>
<Output ItemName="GeneratedLocalizationFiles" TaskParameter="GeneratedLocalizationFiles" />
<Output PropertyName="_RequireMCPass2ForMainAssembly" TaskParameter="RequirePass2ForMainAssembly" />
<Output PropertyName="_RequireMCPass2ForSatelliteAssemblyOnly" TaskParameter="RequirePass2ForSatelliteAssembly" />
<Output ItemName="Compile" TaskParameter="GeneratedCodeFiles" />
<!-- Keep a list of all the generated files, it is used to clean up for a next clean build -->
<Output ItemName="FileWrites" TaskParameter="AllGeneratedFiles" />
<Output ItemName="_GeneratedCodeFiles"
TaskParameter="GeneratedCodeFiles" />
</MarkupCompilePass1>
<Message Text="(out) GeneratedBamlFiles: '@(GeneratedBaml)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(out) SourceCodeFiles: '@(Compile)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(Out) GeneratedCodeFiles: '@(_GeneratedCodeFiles)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(out) GeneratedLocalizationFiles: @(GeneratedLocalizationFiles)" Condition="'$(MSBuildTargetsVerbose)'=='true'" />
<Message Text="(out) _RequireMCPass2ForMainAssembly : '$(_RequireMCPass2ForMainAssembly)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(out) _RequireMCPass2ForSatelliteAssemblyOnly : '$(_RequireMCPass2ForSatelliteAssemblyOnly)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
</Target>
<!--
================================================================
MarkupCompilePass2
================================================================
Name: MarkupCompilePass2
For those xaml files that contain local-implemented types, this target will invoke MarkupCompilePass2
task to compile those xaml files after the main assembly is generated.
If MarkupCompilePass1 task is not invoked, that means there is no any Xaml input file change since last build,
and then it is not required to run this MarkupCompilePass2 either.
-->
<Target Name="MarkupCompilePass2"
Condition="Exists('$(IntermediateOutputPath)$(AssemblyName)_MarkupCompile.lref')" >
<Message Text="(in) References: '@(ReferencePath);@(AssemblyForLocalTypeReference)'" Condition="'$(MSBuildTargetsVerbose)'=='true'" />
<MarkupCompilePass2
AssemblyName="$(AssemblyName)"
OutputType="$(OutputType)"
Language="$(Language)"
LocalizationDirectivesToLocFile="$(LocalizationDirectivesToLocFile)"
RootNamespace="$(RootNamespace)"
References="@(ReferencePath);@(AssemblyForLocalTypeReference)"
KnownReferencePaths="$(MSBuildBinPath);$(TargetFrameworkDirectory);@(_TargetFrameworkSDKDirectoryItem);@(KnownReferencePaths)"
AssembliesGeneratedDuringBuild="@(AssembliesGeneratedDuringBuild)"
AlwaysCompileMarkupFilesInSeparateDomain="$(AlwaysCompileMarkupFilesInSeparateDomain)"
XamlDebuggingInformation="$(XamlDebuggingInformation)"
GeneratedBaml=""
OutputPath="$(IntermediateOutputPath)"
ContinueOnError="false"
SupportCustomOutputPaths="$(IncludePackageReferencesDuringMarkupCompilation)">
<!--
Output Items for MarkupCompilePass2
If MarkupCompilePass2 is only for SatelliteAssembly, Append all the generated baml files into SatelliteEmbeddedFiles, No FileClassifier is required.
If MarupCompilePass2 is for Main Assembly as well, output the Baml files into GeneratedBaml, FileClassifier task will be invoked later.
-->
<Output ItemName="GeneratedBamlWithLocalType"
TaskParameter="GeneratedBaml"
Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Output ItemName="GeneratedBaml"
TaskParameter="GeneratedBaml"
Condition="'$(_RequireMCPass2ForMainAssembly)' == 'true'" />
<Output ItemName="SatelliteEmbeddedFiles"
TaskParameter="GeneratedBaml"
Condition="'$(_RequireMCPass2ForSatelliteAssemblyOnly)' == 'true'" />
<!-- Put the generated files in item FileWrites so that they can be cleaned up appropriately in a next Rebuild -->
<Output ItemName="FileWrites" TaskParameter="GeneratedBaml" />
</MarkupCompilePass2>
<Message Text="(out) After MarkupCompilePass2, SatelliteEmbeddedFiles: '@(SatelliteEmbeddedFiles)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(out) GeneratedBamlWithLocalType: '@(GeneratedBamlWithLocalType)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
</Target>
<!--
================================================================
MarkupCompilePass2ForMainAssembly
================================================================
Name : MarkupCompilePass2ForMainAssembly
This target is invoked only when there is a xaml file which references local-type and is to embed into main assembly.
It is possible when UICulture is not set, or the xaml file has explicitly set Localizable metadata to false.
Condition: _RequireMCPass2ForMainAssembly == true
-->
<PropertyGroup>
<MarkupCompilePass2ForMainAssemblyDependsOn>
GenerateTemporaryTargetAssembly;
MarkupCompilePass2;
AfterMarkupCompilePass2;
CleanupTemporaryTargetAssembly
</MarkupCompilePass2ForMainAssemblyDependsOn>
<_CompileTargetNameForLocalType Condition="'$(_CompileTargetNameForLocalType)' == ''">_CompileTemporaryAssembly</_CompileTargetNameForLocalType>
<!-- The updated .NET 5.0.2 GenerateTemporaryTargetAssembly behavior that supports source generators is off by default. -->
<IncludePackageReferencesDuringMarkupCompilation Condition="'$(IncludePackageReferencesDuringMarkupCompilation)' == ''">true</IncludePackageReferencesDuringMarkupCompilation>
<_ResolveProjectReferencesTargetName Condition="'$(IncludePackageReferencesDuringMarkupCompilation)' != 'false'">ResolveProjectReferences</_ResolveProjectReferencesTargetName>
<_CompileTemporaryAssemblyDependsOn>BuildOnlySettings;ResolveKeySource;$(_ResolveProjectReferencesTargetName);CoreCompile</_CompileTemporaryAssemblyDependsOn>
</PropertyGroup>
<Target Name="_CompileTemporaryAssembly" DependsOnTargets="$(_CompileTemporaryAssemblyDependsOn)" Returns="$(IntermediateOutputPath)$(TargetFileName)"/>
<Target Name="MarkupCompilePass2ForMainAssembly"
Condition="'$(_RequireMCPass2ForMainAssembly)' == 'true' "
DependsOnTargets="$(MarkupCompilePass2ForMainAssemblyDependsOn)" >
</Target>
<!--
==========================================
GenerateTemporaryTargetAssembly
==========================================
Name : GenerateTemporaryTargetAssembly
-->
<Target Name="GenerateTemporaryTargetAssembly" Condition="'$(_RequireMCPass2ForMainAssembly)' == 'true'">
<Message Text="MSBuildProjectFile is $(MSBuildProjectFile)" Condition="'$(MSBuildTargetsVerbose)' == 'true'" />
<!-- Create a temporary target assembly project name with a random component. -->
<PropertyGroup Condition="'$(IncludePackageReferencesDuringMarkupCompilation)' != 'false'">
<_ParentProjectName>$([System.IO.Path]::GetFileNameWithoutExtension('$(MSBuildProjectFullPath)'))</_ParentProjectName>
<_ParentProjectExtension>$([System.IO.Path]::GetExtension($(MSBuildProjectFullPath)))</_ParentProjectExtension>
<_TemporaryTargetAssemblyProjectNameNoExtension>$([System.String]::Join("_", "$(_ParentProjectName)", "$([System.IO.Path]::GetFileNameWithoutExtension($([System.IO.Path]::GetRandomFileName())))", "wpftmp"))</_TemporaryTargetAssemblyProjectNameNoExtension>
<_TemporaryTargetAssemblyProjectName>$(_TemporaryTargetAssemblyProjectNameNoExtension)$(_ParentProjectExtension)</_TemporaryTargetAssemblyProjectName>
</PropertyGroup>
<!-- Collect the generated NuGet files from the parent project required to support PackageReferences. -->
<!--
Note that MSBuildProjectExtensionsPath defaults to BaseIntermediateOutputPath (Microsoft.Common.props)
unless it it set prior to importing the .NET SDK. In the WPF temp project, MSBuildProjectExtensionsPath
cannot be defined before the .NET SDK is imported, and always defaults to BaseIntermediateOutputPath.
-->
<ItemGroup Condition="'$(IncludePackageReferencesDuringMarkupCompilation)' != 'false'">
<_SourceGeneratedNuGetPropsAndTargets Include="$(MSBuildProjectExtensionsPath)$(_ParentProjectName)$(_ParentProjectExtension).nuget.g.props"/>
<_SourceGeneratedNuGetPropsAndTargets Include="$(MSBuildProjectExtensionsPath)$(_ParentProjectName)$(_ParentProjectExtension).nuget.g.targets"/>
<_SourceGeneratedNuGetPropsAndTargets Include="$(MSBuildProjectExtensionsPath)$(_ParentProjectName)$(_ParentProjectExtension).nuget.dgspec.json"/>
<_DestGeneratedNuGetPropsAndTargets Include="$(BaseIntermediateOutputPath)$(_TemporaryTargetAssemblyProjectName).nuget.g.props"/>
<_DestGeneratedNuGetPropsAndTargets Include="$(BaseIntermediateOutputPath)$(_TemporaryTargetAssemblyProjectName).nuget.g.targets"/>
<_DestGeneratedNuGetPropsAndTargets Include="$(BaseIntermediateOutputPath)$(_TemporaryTargetAssemblyProjectName).nuget.dgspec.json"/>
</ItemGroup>
<!-- Project assets and nuget.cache files must also be copied if a custom BaseIntermediateOutputPath is set. -->
<ItemGroup Condition="'$(IncludePackageReferencesDuringMarkupCompilation)' != 'false' and '$(_InitialBaseIntermediateOutputPath)' != '$(BaseIntermediateOutputPath)'">
<_SourceGeneratedNuGetPropsAndTargets Include="$(MSBuildProjectExtensionsPath)project.assets.json"/>
<_SourceGeneratedNuGetPropsAndTargets Include="$(MSBuildProjectExtensionsPath)project.nuget.cache"/>
<_DestGeneratedNuGetPropsAndTargets Include="$(BaseIntermediateOutputPath)project.assets.json"/>
<_DestGeneratedNuGetPropsAndTargets Include="$(BaseIntermediateOutputPath)project.nuget.cache"/>
</ItemGroup>
<!-- Copy the renamed outer project NuGet props/targets files to the MSBuildProjectExtensionsPath used by NuGet. -->
<Copy Condition="'$(IncludePackageReferencesDuringMarkupCompilation)' != 'false'"
SourceFiles="@(_SourceGeneratedNuGetPropsAndTargets)"
DestinationFiles="@(_DestGeneratedNuGetPropsAndTargets)"
/>
<!--
Undo TargetFramework and RID append set in Microsoft.NET.RuntimeIdentifierInference.targets to prevent
a duplicate target framework and runtime identifier in the IntermediateOutputPath when the new BuildEngine
instance runs.
'Append $(RuntimeIdentifier) to directory to output and intermediate paths to prevent bin clashes between
targets. But do not append the implicit default runtime identifier for .NET Framework apps as that would
append a RID the user never mentioned in the path and do so even in the AnyCPU case.'
-->
<PropertyGroup>
<_IntermediateOutputPathNoTargetFrameworkOrRID>$(IntermediateOutputPath)</_IntermediateOutputPathNoTargetFrameworkOrRID>
</PropertyGroup>
<PropertyGroup Condition="'$(IncludePackageReferencesDuringMarkupCompilation)' != 'false' and
'$(AppendRuntimeIdentifierToOutputPath)' == 'true' and '$(RuntimeIdentifier)' != '' and
'$(_UsingDefaultRuntimeIdentifier)' != 'true'">
<_IntermediateOutputPathNoTargetFrameworkOrRID>$([System.Text.RegularExpressions.Regex]::Replace($(_IntermediateOutputPathNoTargetFrameworkOrRID), "$(RuntimeIdentifier)\\$",, System.Text.RegularExpressions.RegexOptions.IgnoreCase))</_IntermediateOutputPathNoTargetFrameworkOrRID>
</PropertyGroup>
<PropertyGroup Condition="'$(IncludePackageReferencesDuringMarkupCompilation)' != 'false' and
'$(AppendTargetFrameworkToOutputPath)' == 'true' and '$(TargetFramework)' != '' and
'$(_UnsupportedTargetFrameworkError)' != 'true'">
<_IntermediateOutputPathNoTargetFrameworkOrRID>$([System.Text.RegularExpressions.Regex]::Replace($(_IntermediateOutputPathNoTargetFrameworkOrRID), "$(TargetFramework)\\$",, System.Text.RegularExpressions.RegexOptions.IgnoreCase))</_IntermediateOutputPathNoTargetFrameworkOrRID>
</PropertyGroup>
<!-- Use the legacy .NET Framework/.NET Core 3.0 GenerateTemporaryTargetAssembly path if 'IncludePackageReferencesDuringMarkupCompilation' is 'false',. -->
<GenerateTemporaryTargetAssembly
CurrentProject="$(MSBuildProjectFullPath)"
MSBuildBinPath="$(MSBuildBinPath)"
ReferencePathTypeName="ReferencePath"
CompileTypeName="Compile"
GeneratedCodeFiles="@(_GeneratedCodeFiles)"
ReferencePath="@(ReferencePath)"
BaseIntermediateOutputPath="$(BaseIntermediateOutputPath)"
IntermediateOutputPath="$(_IntermediateOutputPathNoTargetFrameworkOrRID)"
AssemblyName="$(AssemblyName)"
CompileTargetName="$(_CompileTargetNameForLocalType)"
GenerateTemporaryTargetAssemblyDebuggingInformation="$(GenerateTemporaryTargetAssemblyDebuggingInformation)"
IncludePackageReferencesDuringMarkupCompilation="$(IncludePackageReferencesDuringMarkupCompilation)"
Analyzers="$(Analyzers)"
TemporaryTargetAssemblyProjectName="$(_TemporaryTargetAssemblyProjectName)"
MSBuildProjectExtensionsPath="$(MSBuildProjectExtensionsPath)"
>
<Output TaskParameter="TemporaryAssemblyForLocalTypeReference" PropertyName="_AssemblyForLocalTypeReference" />
</GenerateTemporaryTargetAssembly>
<CreateItem Include="$(_AssemblyForLocalTypeReference)">
<Output TaskParameter="Include" ItemName="AssemblyForLocalTypeReference" />
</CreateItem>
<!-- Remove generated NuGet props/targets files. -->
<Delete
Condition="'$(IncludePackageReferencesDuringMarkupCompilation)' != 'false'
and '$(GenerateTemporaryTargetAssemblyDebuggingInformation)' != 'true'"
Files="@(_DestGeneratedNuGetPropsAndTargets)" />
</Target>
<!--
===========================================
CleanupTemporaryTargetAssembly
===========================================
Name : CleanupTemporaryTargetAssembly
-->
<Target Name="CleanupTemporaryTargetAssembly" >
<Message Text="Remove the temporary project and target assembly" Condition="'$(MSBuildTargetsVerbose)'=='true'" />
<Delete Files="@(AssemblyForLocalTypeReference)"
Condition="Exists('%(Fullpath)')" />
</Target>
<!--
================================================================
SatelliteOnlyMarkupCompilePass2
================================================================
Name : SatelliteOnlyMarkupCompilePass2
This target is invoked only when there is a xaml file which references local-type and no such xaml file is going
to be embedded into main assembly.
Condition: _RequireMCPass2ForSatelliteAssemblyOnly == true
-->
<Target Name="AddIntermediateAssemblyToReferenceList" >
<CreateItem Include="@(IntermediateAssembly)" >
<Output TaskParameter="Include" ItemName="AssemblyForLocalTypeReference" />
</CreateItem>
</Target>
<Target Name="SatelliteOnlyMarkupCompilePass2" Condition="'$(_RequireMCPass2ForSatelliteAssemblyOnly)' == 'true'"
DependsOnTargets="AddIntermediateAssemblyToReferenceList;MarkupCompilePass2" >
</Target>
<!--
============ Manifest Generation Related Properties, Targets ==============
-->
<PropertyGroup Condition="'$(HostInBrowser)' == 'true' and '$(IsApplication)' == 'true'" >
<!-- Set default value for some related properties -->
<!-- For Browser application, manifests should be signed even if the project is not getting published -->
<GenerateManifestsDependsOn>
HostInBrowserValidation;
GenerateApplicationManifest;
ResignApplicationManifest;
GenerateDeploymentManifest;
SignDeploymentManifest
</GenerateManifestsDependsOn>
<GenerateManifests Condition="'$(GenerateManifests)' == ''" >true</GenerateManifests>
<GenerateClickOnceManifests Condition="'$(GenerateClickOnceManifests)' == ''">$(GenerateManifests)</GenerateClickOnceManifests>
<!--
If 'install' is not set in project file, set it to false here.
But if 'install' is set in project, don't change it now. Later
the PropertyValidation target will check if it is correct or not.
-->
<Install Condition="'$(Install)'==''">false</Install>
<!--
The valid values for TargetZone are :
Internet, Intranet, LocalMachine, Custom
User can set all above vaild values in project file.
If this property is not set in project, for HostInBrowser,
we set default value 'Internet' here.
-->
<TargetZone Condition="'$(TargetZone)' == ''">Internet</TargetZone>
<!--
Overwrite below properties which have been set in Microsoft.Common.targets.
-->
<TargetUrl Condition="'$(TargetUrl)' != ''">$(TargetUrl)/$(TargetDeployManifestFileName)</TargetUrl>
<StartURL Condition="'$(StartURL)'==''">$(MSBuildProjectDirectory)\bin\$(Configuration)\$(TargetDeployManifestFileName)</StartURL>
<StartArguments Condition="'$(StartArguments)' == ''">-debug "$(StartURL)"</StartArguments>
<StartArguments Condition="'$(DebugSecurityZoneURL)' != ''">$(StartArguments) -DebugSecurityZoneURL "$(DebugSecurityZoneURL)"</StartArguments>
</PropertyGroup>
<!--
Do some property value check before the real manifest generation task starts.
WinFX.targets should care about the property setting for Browser application only.
For a regular ClickOnce application, Microsoft.Common.targets is responsible for
the setting validation.
-->
<Target Name="HostInBrowserValidation" Condition="'$(HostInBrowser)' == 'true'" >
<Message Text="(in) Install: '$(Install)'" Condition="'$(MSBuildTargetsVerbose)' == 'true'" />
<!--
TODO: Will get error message from Build task resource so that the message is
localizable and can be set an unique error ID.
-->
<Error Condition="'$(GenerateManifests)' != 'true'" Text="Property GenerateManifests should not be set a value other than true for a browser application." />
<Error Condition="'$(Install)' == 'true'" Text="Property Install and HostInBrowser should not be both set to true." />
<Error Condition=" '$(PlatformTarget)' != '' and '$(PlatformTarget)' != 'AnyCpu' "
Text="Cannot build a platform-specific XAML Browser Application. If HostInBrowser property is set to 'True', either do not set the PlatformTarget property or set it to 'AnyCpu'." />
</Target>
<Target Name="SplashScreenValidation" Condition="'@(SplashScreen)' != ''" >
<Error Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' And
'$(_TargetFrameworkVersionWithoutV)' != '' And
'$(_TargetFrameworkVersionWithoutV)' == '3.0'"
Text="The SplashScreen Build Action is not supported on $(TargetFrameworkIdentifier) $(TargetFrameworkVersion)." />
</Target>
<!--
Resign Application Manifest after update.
_DeploymentResolvedManifestCertificateThumbprint property is set only when SignManifest is set to true.
-->
<Target Name="ResignApplicationManifest" Condition="'$(_DeploymentResolvedManifestCertificateThumbprint)'!= ''" >
<Message Text="(in) ApplicationManifest: '@(ApplicationManifest)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(in) ManifestKeyFile: '$(ManifestKeyFile)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(in) _DeploymentResolvedManifestCertificateThumbprint: '$(_DeploymentResolvedManifestCertificateThumbprint)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<SignFile
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
TimestampUrl="$(ManifestTimestampUrl)"
SigningTarget="@(ApplicationManifest)"/>
</Target>
<!--
Sign Deployment Manifest if SignManifest is set to true.
_DeploymentResolvedManifestCertificateThumbprint property is set only when SignManifest is set to true.
-->
<Target Name="SignDeploymentManifest" Condition=" '$(_DeploymentResolvedManifestCertificateThumbprint)' != '' " >
<Message Text="(in) DeployManifest: '@(DeployManifest)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(in) ManifestKeyFile: '$(ManifestKeyFile)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(in) _DeploymentResolvedManifestCertificateThumbprint: '$(_DeploymentResolvedManifestCertificateThumbprint)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<SignFile
CertificateThumbprint="$(_DeploymentResolvedManifestCertificateThumbprint)"
TimestampUrl="$(ManifestTimestampUrl)"
SigningTarget="@(DeployManifest)"/>
</Target>
<!--
================================================================
FileClassification
================================================================
Classify baml and image files into different groups for Main assembly and satellite assembly respectively.
-->
<Target Name="FileClassification">
<FileClassifier Condition="'@(GeneratedBaml)' != '' or '@(Resource)' != '' or '@(Font)' != ''"
SourceFiles="@(SplashScreen);@(GeneratedBaml);@(Resource);@(Font)"
Culture="$(UICulture)"
OutputType="$(OutputType)"
MainEmbeddedFiles="@(MainEmbeddedFiles)"
SatelliteEmbeddedFiles="@(SatelliteEmbeddedFiles)"
CLREmbeddedResource="@(CLREmbeddedResources)"
CLRSatelliteEmbeddedResource="@(CLRSatelliteEmbeddedResources)"
CLRResourceFiles="@(CLRResources)" >
<Output ItemName="MainEmbeddedFiles" TaskParameter="MainEmbeddedFiles" />
<Output ItemName="SatelliteEmbeddedFiles" TaskParameter="SatelliteEmbeddedFiles" />
<Output ItemName="WinFXEmbeddedResource" TaskParameter="CLREmbeddedResource" />
<Output ItemName="WinFXEmbeddedResource" TaskParameter="CLRSatelliteEmbeddedResource" />
</FileClassifier>
<Message Text="(out) EmbeddedFiles: '@(MainEmbeddedFiles)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<Message Text="(out) SatelliteEmbeddedFiles: '@(SatelliteEmbeddedFiles)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
</Target>
<!--
================================================================
MainResourcesGeneration
================================================================
-->
<PropertyGroup>
<!--
If the UICulture is not set, resources will be embedded into main assembly.
keep $(AssemblyName).g.resources as resource name for this scenario.
If the UICulture is set to some culture, all the localizable resources will
be embedded into satellite assembly, and all the non-localizable resources
will be embedded into main assembly. for this scenario, keep
$(AssemblyName).g for localizable resources,
$(AssemblyName).unlocalizable.g for unlocalizable resources
-->
<_ResourceNameInMainAssembly Condition="'$(UICulture)' == ''">$(AssemblyName).g.resources</_ResourceNameInMainAssembly>
<_ResourceNameInMainAssembly Condition="'$(UICulture)' != ''">$(AssemblyName).unlocalizable.g.resources</_ResourceNameInMainAssembly>
</PropertyGroup>
<Target Name="MainResourcesGeneration" Inputs="@(MainEmbeddedFiles)" Outputs="$(IntermediateOutputPath)$(_ResourceNameInMainAssembly)" Condition="'@(MainEmbeddedFiles)' != ''">
<!--
This generates .resources file containing all the resources that are to be
embedded in the main assembly and dont need to be localized
-->
<Message Text="(in) EmbeddedFiles: '@(MainEmbeddedFiles)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<ResourcesGenerator
ResourceFiles="@(MainEmbeddedFiles)"
OutputPath="$(IntermediateOutputPath)"
OutputResourcesFile="$(IntermediateOutputPath)$(_ResourceNameInMainAssembly)"
Condition="'@(MainEmbeddedFiles)' != ''">
<!-- Put the generated files in item FileWrites so that they can be cleaned up appropriately in a next Rebuild -->
<Output ItemName="FileWrites" TaskParameter="OutputResourcesFile" />
</ResourcesGenerator>
<ItemGroup>
<EmbeddedResource Include="$(IntermediateOutputPath)$(_ResourceNameInMainAssembly)">
<GenerateResource>false</GenerateResource>
<Type>Resx</Type>
<WithCulture>false</WithCulture>
<OutputResource>$(IntermediateOutputPath)$(_ResourceNameInMainAssembly)</OutputResource>
</EmbeddedResource>
</ItemGroup>
</Target>
<!--
================================================================
SatelliteResourceGeneration
================================================================
This target just takes the SatelliteEmbeddedFiles such as .baml, images, fonts. etc
But not any $(Culture).resx and .resText etc. those files should have been handled by
PrepareResource target.
This target should output an EmbeddedResource Item, which is then taken by
CreateSatelliteAssemblies target.
-->
<Target Name="SatelliteResourceGeneration"
Condition="'$(UICulture)' != ''"
Inputs="@(SatelliteEmbeddedFiles)"
Outputs="$(IntermediateOutputPath)$(AssemblyName).g.$(UICulture).resources">
<!--
This generates .resources file containing all the resources that are to be embedded
in the satellite assembly and need to be localized.
This task only runs if the default culture of the build is not NULL
-->
<Message Text="(in) SatelliteEmbeddedFiles: '@(SatelliteEmbeddedFiles)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<ResourcesGenerator
ResourceFiles="@(SatelliteEmbeddedFiles)"
OutputPath="$(IntermediateOutputPath)"
OutputResourcesFile="$(IntermediateOutputPath)$(AssemblyName).g.$(UICulture).resources"
Condition="'@(SatelliteEmbeddedFiles)' != ''">
<Output ItemName="_SatelliteResourceFile" TaskParameter="OutputResourcesFile" />
<!-- Put the generated files in item FileWrites so that they can be cleaned up appropriately in a next Rebuild -->
<Output ItemName="FileWrites" TaskParameter="OutputResourcesFile" />
</ResourcesGenerator>
<Message Text="(out) _SatelliteResourceFile is '@(_SatelliteResourceFile)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
</Target>
<!--
This target should always run after SatelliteResourceGeneration, so that it
can generate the correct Item which contains right Culture attribute even for
incremental build.
-->
<Target Name="GenerateResourceWithCultureItem" Condition="'$(UICulture)' != ''" >
<Message Text="(out) _SatelliteResourceFile: '@(_SatelliteResourceFile)'" Condition="'$(MSBuildTargetsVerbose)'=='true'"/>
<ItemGroup>
<EmbeddedResource Include="@(_SatelliteResourceFile)">
<Culture>$(UICulture)</Culture>
<GenerateResource>false</GenerateResource>
<Type>Resx</Type>
<WithCulture>true</WithCulture>
<OutputResource>@(_SatelliteResourceFile)</OutputResource>
</EmbeddedResource>
</ItemGroup>
</Target>
<!-- Overwrite some target and properties for Publish support -->
<!--
PublishBuildDependsOn property is defined in Microsoft.Common.targets, but it doesn't handle WinFX
resx file, since this resx file is not set into project file, but is generated at build time.
For Publish Build, we need to make sure the $(Target).g.$(UICulture).resources is handled correctly.
Add target "PrepareResourcesForSatelliteAssemblies" to the place prior to CreateSatelliteAssemblies.
-->
<PropertyGroup>
<PublishBuildDependsOn>
BuildOnlySettings;
PrepareForBuild;
ResolveReferences;
PrepareResources;
ResolveKeySource;
PrepareResourcesForSatelliteAssemblies;
GenerateSerializationAssemblies;
CreateSatelliteAssemblies;
</PublishBuildDependsOn>
</PropertyGroup>
<!--
SatelliteDllsProjectOutputGroup target is implemented in Microsoft.Common.targets, but it doesn't handle WinFX
satellite assembly, since for WinFX, the $(targetname).g.$(UICulture).resx is not set into project file, but is generated
at build time after Xaml file is compiled, (for some case, it is generated after the main dll is compiled).
So overwrite this target, copy the content from Microsoft.Common.targets and inject the part for our UICulture support.
-->
<!--
================================================================
SatelliteDllsProjectOutputGroup
================================================================
This target performs population of the Satellite Files project output group.
-->
<Target
Name="SatelliteDllsProjectOutputGroup"
DependsOnTargets="PrepareResourceNames"
Returns="@(SatelliteDllsProjectOutputGroupOutput)"
KeepDuplicateOutputs="False">
<CreateItem
Include="$(IntermediateOutputPath)%(ResxWithCulture.Culture)\$(TargetName).resources.dll"
AdditionalMetadata="TargetPath=%(ResxWithCulture.Culture)\$(TargetName).resources.dll"
Condition="'@(ResxWithCulture)' != ''">
<Output ItemName="SatelliteDllsProjectOutputGroupOutputIntermediate" TaskParameter="Include" />
</CreateItem>
<!-- This task is WinFX specific. -->
<CreateItem
Include="$(IntermediateOutputPath)$(UICulture)\$(TargetName).resources.dll"
AdditionalMetadata="TargetPath=$(UICulture)\$(TargetName).resources.dll"
Condition="'$(UICulture)' != ''">
<Output ItemName="SatelliteDllsProjectOutputGroupOutputIntermediate" TaskParameter="Include" />
</CreateItem>
<!-- End of WinFX specific -->
<CreateItem
Include="$(IntermediateOutputPath)%(NonResxWithCulture.Culture)\$(TargetName).resources.dll"
AdditionalMetadata="TargetPath=%(NonResxWithCulture.Culture)\$(TargetName).resources.dll"
Condition="'@(NonResxWithCulture)' != ''">
<Output ItemName="SatelliteDllsProjectOutputGroupOutputIntermediate" TaskParameter="Include" />
</CreateItem>
<CreateItem Include="$(IntermediateOutputPath)">
<Output ItemName="SatelliteDllsProjectOutputGroupRootRelativeUrlBaseIntermediate" TaskParameter="Include"/>
</CreateItem>
<!-- Convert intermediate items into final items; this way we can get the full path for each item. -->
<CreateItem Include="@(SatelliteDllsProjectOutputGroupOutputIntermediate->'%(FullPath)')">
<Output ItemName="SatelliteDllsProjectOutputGroupOutput" TaskParameter="Include"/>
</CreateItem>
</Target>
<!-- Other Targets -->
<Target Name="CheckUid"
Condition="'@(Page)' != '' or '@(ApplicationDefinition)' != ''">
<UidManager MarkupFiles="@(Page);@(ApplicationDefinition)" Task="Check" />
</Target>
<Target Name="UpdateUid"
Condition="'@(Page)' != '' or '@(ApplicationDefinition)' != ''">
<UidManager MarkupFiles="@(Page);
@(ApplicationDefinition)"
IntermediateDirectory ="$(IntermediateOutputPath)"
Task="Update" />
</Target>
<Target Name="RemoveUid"
Condition="'@(Page)' != '' or '@(ApplicationDefinition)' != ''">
<UidManager MarkupFiles="@(Page);
@(ApplicationDefinition)"
IntermediateDirectory ="$(IntermediateOutputPath)"
Task="Remove" />
</Target>
<!--
================================================================
MergeLocalizationDirectives
================================================================
Merge localization comments of single bamls into one file for the whole assembly.
-->
<Target Name="MergeLocalizationDirectives"
Condition="'@(GeneratedLocalizationFiles)' !=''"
Inputs="@(GeneratedLocalizationFiles)"
Outputs="$(IntermediateOutputPath)$(AssemblyName).loc"
>
<MergeLocalizationDirectives GeneratedLocalizationFiles="@(GeneratedLocalizationFiles)"
OutputFile="$(IntermediateOutputPath)$(AssemblyName).loc"/>
<!--
Add the merged loc file into _NoneWithTargetPath so that it will be copied to the
output directory
-->
<CreateItem Condition="Exists('$(IntermediateOutputPath)$(AssemblyName).loc')"
Include="$(IntermediateOutputPath)$(AssemblyName).loc"
AdditionalMetadata="CopyToOutputDirectory=PreserveNewest; TargetPath=$(AssemblyName).loc" >
<Output ItemName="_NoneWithTargetPath" TaskParameter="Include"/>
<Output ItemName="FileWrites" TaskParameter="Include"/>
</CreateItem>
</Target>
<!-- End of other targets -->
<!--
This is similar to AssignTargetPaths target in Microsoft.Common.targets.
But it handles only the generated WinFXEmbeddedResource item type.
After this target is done, SplitResourceByCulture target can take the right input
and handle the resource correctly.
-->
<Target Name="AssignWinFXEmbeddedResource"
Condition="'@(WinFXEmbeddedResource)' != ''" >
<ItemGroup>
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
<AssignTargetPath Files="@(WinFXEmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)">
<Output TaskParameter="AssignedFiles" ItemName="_Temporary" />
</AssignTargetPath>
<ItemGroup>
<EmbeddedResource Remove="@(_Temporary)" />
<EmbeddedResource Include="@(_Temporary)" />
<_Temporary Remove="@(_Temporary)" />
</ItemGroup>
</Target>
<!-- End of the project file, Do not add any more propeties, items, targets etc. -->
</Project>