Merge pull request #637 from LogosBible/enetdown
[mono.git] / mcs / tools / xbuild / xbuild / 4.0 / Microsoft.Common.targets
1 <Project DefaultTargets="Build" InitialTargets="_ValidateEssentialProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2         <PropertyGroup>
3                 <ImportByWildcardBeforeMicrosoftCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == ''">true</ImportByWildcardBeforeMicrosoftCommonTargets>
4                 <ImportByWildcardAfterMicrosoftCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == ''">true</ImportByWildcardAfterMicrosoftCommonTargets>
5         </PropertyGroup>
6
7         <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore\*"
8                 Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore')"/>
9
10         <PropertyGroup>
11                 <TargetExt Condition="'$(OutputType)' == 'Winexe'">.exe</TargetExt>
12                 <TargetExt Condition="'$(OutputType)' == 'Exe'">.exe</TargetExt>
13                 <TargetExt Condition="'$(OutputType)' == 'Library'">.dll</TargetExt>
14                 <TargetExt Condition="'$(OutputType)' == 'Netmodule'">.netmodule</TargetExt>
15         </PropertyGroup>
16
17         <PropertyGroup>
18                 <ProjectDir Condition="'$(ProjectDir)' == ''">$(MSBuildProjectDirectory)\</ProjectDir>
19         </PropertyGroup>
20
21         <PropertyGroup>
22                 <AssemblyName Condition="'$(AssemblyName)' == ''">$(RootNamespace)</AssemblyName>
23                 <OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath> 
24                 <OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
25                 <WarningLevel Condition="'$(WarningLevel)' == ''" >2</WarningLevel>
26
27                 <TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier>
28                 <TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.0</TargetFrameworkVersion>
29
30                 <TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == '' and '$(TargetFrameworkProfile)' != ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion),Profile=$(TargetFrameworkProfile)</TargetFrameworkMoniker>
31                 <TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == ''">$(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)</TargetFrameworkMoniker>
32         </PropertyGroup>
33
34         <PropertyGroup>
35                 <OutDir Condition="'$(OutDir)' == ''">$(OutputPath)</OutDir>
36                 <OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
37
38                 <_OriginalConfiguration>$(Configuration)</_OriginalConfiguration>
39                 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
40                 <ConfigurationName Condition="'$(ConfigurationName)' == ''">$(Configuration)</ConfigurationName>
41
42                 <_OriginalPlatform>$(Platform)</_OriginalPlatform>
43                 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
44                 <PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
45
46                 <AddAdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == ''">true</AddAdditionalExplicitAssemblyReferences>
47                 <AdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == 'true' and '$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.0'">System.Core;$(AdditionalExplicitAssemblyReferences)</AdditionalExplicitAssemblyReferences>
48         </PropertyGroup>
49
50         <PropertyGroup>
51                 <SkipCopyUnchangedFiles Condition="'$(SkipCopyUnchangedFiles)' == ''">true</SkipCopyUnchangedFiles>
52         </PropertyGroup>
53
54         <PropertyGroup>
55                 <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">obj\</BaseIntermediateOutputPath>
56                 <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
57                 <CleanFile Condition="'$(CleanFile)'==''">$(MSBuildProjectFile).FilesWrittenAbsolute.txt</CleanFile>
58         </PropertyGroup>
59
60         <PropertyGroup Condition="'$(IntermediateOutputPath)' == ''">
61                 <IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU'">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
62                 <IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU'">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
63         </PropertyGroup>
64
65         <PropertyGroup>
66                 <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
67         </PropertyGroup>
68
69         <ItemGroup>
70                 <IntermediateAssembly Include="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt)" />
71
72                 <!-- creating this as a item to use FullPath on it, to build TargetPath -->
73                 <_OutDirItem Include="$(OutDir)"/>
74         </ItemGroup>
75
76         <PropertyGroup>
77                 <TargetName Condition="'$(TargetName)' == '' ">$(AssemblyName)</TargetName>
78                 <TargetFileName Condition="'$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
79                 <TargetDir Condition=" '$(TargetDir)' == '' ">@(_OutDirItem->'%(FullPath)')</TargetDir>
80                 <TargetPath Condition=" '$(TargetPath)' == '' ">@(_OutDirItem->'%(FullPath)\$(TargetFileName)')</TargetPath>
81                 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildProjectFullPath);$(MSBuildToolsPath)\Microsoft.Common.targets</MSBuildAllProjects>
82                 <KeyOriginatorFile Condition=" '$(SignAssembly)' == 'true' ">$(AssemblyOriginatorKeyFile)</KeyOriginatorFile>
83                 <TargetingClr2Framework Condition="('$(TargetFrameworkIdentifier)' == '.NETFramework') and ('$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5')">true</TargetingClr2Framework>
84         </PropertyGroup>
85
86         <Target Name="_ValidateEssentialProperties">
87                 <Error Condition=" '$(OutputPath)' == '' and '$(SkipInvalidConfigurations)' != 'true'"
88                         Text="'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: $(_OriginalConfiguration) Platform: $(_OriginalPlatform)."/>
89
90                 <Warning Condition=" '$(OutputPath)' == '' and '$(SkipInvalidConfigurations)' == 'true'"
91                         Text="'OutputPath' property is not set for this project. Usually this is caused by invalid Configuration/Platform combination. Original values: Configuration: $(_OriginalConfiguration) Platform: $(_OriginalPlatform)."/>
92
93                 <!-- If OutDir is specified via the command line, then the earlier check
94                      to add a trailing slash won't have any affect, so error here. -->
95                 <Error
96                         Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')"
97                         Text="OutDir property must end with a slash."/>
98         </Target>
99
100         <Target Name="PrepareForBuild">
101                 <Message Importance="High" Text="Configuration: $(Configuration) Platform: $(Platform)"/>
102
103                 <!-- Look for app.config, if $(AppConfig) is specified, then use that. Else look in
104                      @(None) and @(Content) -->
105                 <CreateItem Include="$(AppConfig)" Condition="'$(AppConfig)' != ''"
106                         AdditionalMetadata="TargetPath=$(TargetFileName).config">
107                         <Output TaskParameter="Include" ItemName="AppConfigWithTargetPath" />
108                 </CreateItem>
109
110                 <FindAppConfigFile PrimaryList="@(None)" SecondaryList="@(Content)" TargetPath="$(TargetFileName).config"
111                         Condition="'$(AppConfig)' == ''">
112                         <Output TaskParameter="AppConfigFile" ItemName="AppConfigWithTargetPath"/>
113                 </FindAppConfigFile>
114
115                 <MakeDir 
116                         Directories="$(OutDir);$(IntermediateOutputPath);@(DocFileItem->'%(RelativeDir)')"
117                 />
118         </Target>
119
120         <PropertyGroup>
121                 <GetFrameworkPathsDependsOn />
122         </PropertyGroup>
123         <Target Name="GetFrameworkPaths"
124                 Condition="'$(TargetFrameworkIdentifier)' == '' or '$(TargetFrameworkIdentifier)' == '.NETFramework'"
125                 DependsOnTargets="$(GetFrameworkPathsDependsOn)">
126                 <GetFrameworkPath>
127                         <Output Condition="'$(TargetFrameworkVersion)' == 'v4.5'"
128                                 TaskParameter="FrameworkVersion45Path"
129                                 ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
130                         <Output Condition="'$(TargetFrameworkVersion)' == 'v4.0'"
131                                 TaskParameter="FrameworkVersion40Path"
132                                 ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
133                         <Output Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
134                                 TaskParameter="FrameworkVersion35Path"
135                                 ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
136                         <Output Condition="'$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'" 
137                                 TaskParameter="FrameworkVersion30Path"
138                                 ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
139                         <Output Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'" 
140                                 TaskParameter="FrameworkVersion20Path"
141                                 ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
142                 </GetFrameworkPath>
143                 <CreateProperty Value="@(_CombinedTargetFrameworkDirectoriesItem)">
144                         <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
145                 </CreateProperty>
146
147                 <Warning Text="TargetFrameworkVersion '$(TargetFrameworkVersion)' not supported by this toolset (ToolsVersion: $(MSBuildToolsVersion))."
148                         Condition="'$(TargetFrameworkVersion)' != 'v4.5' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
149         </Target>
150
151         <PropertyGroup>
152                 <GetReferenceAssemblyPathsDependsOn />
153         </PropertyGroup>
154         <Target Name="GetReferenceAssemblyPaths" DependsOnTargets="$(GetReferenceAssemblyPathsDependsOn)">
155                 <!-- in case of .NETFramework, $(TargetFrameworkDirectory) would have been set by
156                 GetFrameworkPaths, if it hasn't been changed, then clear it, to avoid duplicates -->
157                 <CreateProperty Value="" Condition="'@(_CombinedTargetFrameworkDirectoriesItem)' == '$(TargetFrameworkDirectory)'">
158                         <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
159                 </CreateProperty>
160
161                 <GetReferenceAssemblyPaths
162                         Condition="'$(TargetFrameworkMoniker)' != '' and '$(_TargetFrameworkDirectories)' == ''"
163                         TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
164                         RootPath="$(TargetFrameworkRootPath)">
165
166                         <Output TaskParameter="ReferenceAssemblyPaths" PropertyName="_TargetFrameworkDirectories"/>
167                         <Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths"/>
168                         <Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName"/>
169                 </GetReferenceAssemblyPaths>
170
171                 <CreateProperty Value="$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory)">
172                         <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
173                 </CreateProperty>
174         </Target>
175
176         <PropertyGroup>
177                 <AllowedReferenceAssemblyFileExtensions Condition=" '$(AllowedReferenceAssemblyFileExtensions)' == '' ">
178                         .exe;
179                         .dll
180                 </AllowedReferenceAssemblyFileExtensions>
181
182                 <AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
183                         .mdb
184                 </AllowedReferenceRelatedFileExtensions>
185
186                 <AssemblySearchPaths Condition="'$(AssemblySearchPaths)' == ''">
187                         {CandidateAssemblyFiles};
188                         $(ReferencePath);
189                         {HintPathFromItem};
190                         {TargetFrameworkDirectory};
191                         {PkgConfig};
192                         {GAC};
193                         {RawFileName};
194                         $(OutDir)
195                 </AssemblySearchPaths>
196
197                 <ResolveReferencesDependsOn>
198                         BeforeResolveReferences;
199                         ResolveProjectReferences;
200                         ResolveAssemblyReferences;
201                         AfterResolveReferences
202                 </ResolveReferencesDependsOn>
203
204                 <ResolveAssemblyReferencesDependsOn>
205                         GetFrameworkPaths;
206                         GetReferenceAssemblyPaths;
207                         PrepareForBuild
208                 </ResolveAssemblyReferencesDependsOn>
209         </PropertyGroup>
210
211         <Target Name="ResolveReferences" DependsOnTargets="$(ResolveReferencesDependsOn)"/>
212
213         <Target Name="BeforeResolveReferences" />
214         <Target Name="AfterResolveReferences" />
215
216         <Target Name="ResolveAssemblyReferences" DependsOnTargets="$(ResolveAssemblyReferencesDependsOn)">
217                 <CreateItem Include="@(Reference)" Exclude="$(AdditionalExplicitAssemblyReferences)">
218                         <Output TaskParameter="Include" ItemName="_Reference"/>
219                 </CreateItem>
220
221                 <CreateItem Include="$(AdditionalExplicitAssemblyReferences)">
222                         <Output TaskParameter="Include" ItemName="_Reference"/>
223                 </CreateItem>
224
225                 <ResolveAssemblyReference
226                         Assemblies="@(_Reference)"
227                         AssemblyFiles="@(ChildProjectReferences)"
228                         SearchPaths="$(AssemblySearchPaths)"
229                         CandidateAssemblyFiles="@(Content);@(None)"
230                         TargetFrameworkDirectories="$(TargetFrameworkDirectory)"
231                         AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
232                         AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
233                         FindDependencies="true"
234                         FindSatellites="true"
235                         FindRelatedFiles="true"
236                         TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
237                         TargetFrameworkMonikerDisplayName="$(TargetFrameworkMonikerDisplayName)"
238                         TargetFrameworkVersion="$(TargetFrameworkVersion)"
239                 >
240                         <Output TaskParameter="ResolvedFiles" ItemName="ResolvedFiles"/>
241                         <Output TaskParameter="ResolvedFiles" ItemName="ReferencePath"/>
242                         <Output TaskParameter="ResolvedDependencyFiles" ItemName="_ResolvedDependencyFiles"/>
243                         <Output TaskParameter="RelatedFiles" ItemName="_ReferenceRelatedPaths"/>
244                         <Output TaskParameter="SatelliteFiles" ItemName="ReferenceSatellitePaths"/>
245                         <Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
246                 </ResolveAssemblyReference>
247         </Target>
248
249         <Target
250                 Name="AssignProjectConfigurations"
251                 Condition="'@(ProjectReference)' != ''">
252
253                 <!-- assign configs if building a solution file -->
254                 <AssignProjectConfiguration
255                         ProjectReferences = "@(ProjectReference)"
256                         SolutionConfigurationContents = "$(CurrentSolutionConfigurationContents)"
257                         Condition="'$(BuildingSolutionFile)' == 'true'">
258
259                         <Output TaskParameter = "AssignedProjects" ItemName = "ProjectReferenceWithConfiguration"/>
260                 </AssignProjectConfiguration>
261
262                 <!-- Else, just -->
263                 <CreateItem Include="@(ProjectReference)" Condition="'$(BuildingSolutionFile)' != 'true'">
264                         <Output TaskParameter="Include" ItemName="ProjectReferenceWithConfiguration"/>
265                 </CreateItem>
266
267         </Target>
268
269         <!-- Split projects into 2 lists
270                 ProjectReferenceWithConfigurationExistent: Projects existent on disk
271                 ProjectReferenceWithConfigurationNonExistent: Projects non-existent on disk -->
272
273         <Target Name="SplitProjectReferencesByExistent"
274                 DependsOnTargets="AssignProjectConfigurations">
275
276                 <CreateItem Include="@(ProjectReferenceWithConfiguration)" Condition="'@(ProjectReferenceWithConfiguration)' != ''">
277                         <Output TaskParameter="Include" ItemName="ProjectReferenceWithConfigurationExistent"
278                                 Condition="Exists ('%(ProjectReferenceWithConfiguration.Identity)')"/>
279
280                         <Output TaskParameter="Include" ItemName="ProjectReferenceWithConfigurationNonExistent"
281                                 Condition="!Exists ('%(ProjectReferenceWithConfiguration.Identity)')"/>
282                 </CreateItem>
283         </Target>
284
285         <Target
286                 Name="ResolveProjectReferences"
287                 DependsOnTargets="SplitProjectReferencesByExistent"
288         >
289                 <!-- If building from a .sln.proj or from IDE, then referenced projects have already
290                      been built, so just get the target paths -->
291                 <MSBuild
292                         Projects="@(ProjectReferenceWithConfigurationExistent)"
293                         Targets="GetTargetPath"
294                         Properties="%(ProjectReferenceWithConfigurationExistent.SetConfiguration); %(ProjectReferenceWithConfigurationExistent.SetPlatform)"
295                         Condition="'@(ProjectReferenceWithConfigurationExistent)' != '' and ('$(BuildingSolutionFile)' == 'true' or '$(BuildingInsideVisualStudio)' == 'true')">
296
297                         <Output TaskParameter="TargetOutputs" ItemName="ChildProjectReferences" />
298                 </MSBuild>
299
300                 <!-- Building a project directly, build the referenced the projects also -->
301                 <MSBuild
302                         Projects="@(ProjectReferenceWithConfigurationExistent)"
303                         Properties="%(ProjectReferenceWithConfigurationExistent.SetConfiguration); %(ProjectReferenceWithConfigurationExistent.SetPlatform)"
304                         Condition="'@(ProjectReferenceWithConfigurationExistent)' != '' and '$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true' ">
305
306                         <Output TaskParameter="TargetOutputs" ItemName="ChildProjectReferences" />
307                 </MSBuild>
308
309                 <Warning Text="Referenced Project %(ProjectReferenceWithConfigurationNonExistent.Identity) not found, ignoring."
310                          Condition="'@(ProjectReferenceWithConfigurationNonExistent)' != ''"/>
311         </Target>
312
313         <Target Name = "CopyFilesMarkedCopyLocal">
314                 <Copy
315                         SourceFiles="@(ReferenceCopyLocalPaths)"
316                         DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
317                         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
318                         <Output TaskParameter = "DestinationFiles" ItemName = "FileWritesShareable"/>
319                 </Copy>
320         </Target>
321
322         <Target Name="_ComputeNonExistentFileProperty" Condition='false'>
323                 <CreateProperty Value="__NonExistentSubDir__\__NonExistentFile__">
324                         <Output TaskParameter="Value" PropertyName="NonExistentFile"/>
325                 </CreateProperty>
326         </Target>
327
328         <PropertyGroup>
329                 <BuildDependsOn>
330                         BeforeBuild;
331                         CoreBuild;
332                         AfterBuild
333                 </BuildDependsOn>
334         </PropertyGroup>
335
336         <Target Name="BeforeBuild"/>
337         <Target Name="AfterBuild"/>
338
339         <Target Name="Build" DependsOnTargets="$(BuildDependsOn)" Outputs="$(TargetPath)"/>
340
341         <PropertyGroup>
342                 <CoreBuildDependsOn>
343                         PrepareForBuild;
344                         GetFrameworkPaths;
345                         GetReferenceAssemblyPaths;
346                         PreBuildEvent;
347                         ResolveReferences;
348                         CopyFilesMarkedCopyLocal;
349                         PrepareResources;
350                         Compile;
351                         PrepareForRun;
352                         DeployOutputFiles;
353                         _RecordCleanFile;
354                         PostBuildEvent
355                 </CoreBuildDependsOn>
356         </PropertyGroup>
357
358         <Target
359                 Name="CoreBuild"
360                 DependsOnTargets="$(CoreBuildDependsOn)"
361                 Outputs="$(OutDir)$(AssemblyName)$(TargetExt)">
362
363                 <OnError ExecuteTargets="_TimestampAfterCompile;PostBuildEvent"
364                         Condition=" '$(RunPostBuildEvent)' == 'Always' or '$(RunPostBuildEvent)' == 'OnOutputUpdated'"/>
365
366                 <OnError ExecuteTargets="_RecordCleanFile" />
367         </Target>
368
369         <PropertyGroup>
370                 <CompileDependsOn>
371                         ResolveReferences;
372                         BeforeCompile;
373                         _TimestampBeforeCompile;
374                         CoreCompile;
375                         _TimestampAfterCompile;
376                         AfterCompile
377                 </CompileDependsOn>
378         </PropertyGroup>
379
380         <Target Name="BeforeCompile" />
381         <Target Name="AfterCompile" />
382
383         <Target Name="Compile" DependsOnTargets="$(CompileDependsOn)"/>
384
385         <PropertyGroup>
386                 <PrepareForRunDependsOn>
387                         DeployOutputFiles
388                 </PrepareForRunDependsOn>
389         </PropertyGroup>
390         <Target Name="PrepareForRun" DependsOnTargets="$(PrepareForRunDependsOn)"/>
391
392         <PropertyGroup>
393                 <PrepareResourcesDependsOn>
394                         AssignTargetPaths;
395                         SplitResourcesByCulture;
396                         CreateManifestResourceNames;
397                         CopyNonResxEmbeddedResources;
398                         GenerateResources;
399                         GenerateSatelliteAssemblies;
400                         CompileLicxFiles
401                 </PrepareResourcesDependsOn>
402         </PropertyGroup>
403         <Target Name="PrepareResources" DependsOnTargets="$(PrepareResourcesDependsOn)" />
404
405         <Target Name="SplitResourcesByCulture" DependsOnTargets="AssignTargetPaths">
406                 <!-- Extract .licx files into @(LicxFiles) -->
407                 <CreateItem Include="@(EmbeddedResourceWithTargetPath)" Condition="'%(Extension)' == '.licx'">
408                         <Output TaskParameter="Include" ItemName="LicxFiles"/>
409                 </CreateItem>
410
411                 <!-- Split *remaining* resource files into various groups.. -->
412                 <AssignCulture Files="@(EmbeddedResourceWithTargetPath)" Condition="'%(Extension)' != '.licx'">
413                         <Output TaskParameter="AssignedFilesWithNoCulture" ItemName="ResourcesWithNoCulture"/>
414                         <Output TaskParameter="AssignedFilesWithCulture" ItemName="ResourcesWithCulture"/>
415                 </AssignCulture>
416
417                 <CreateItem Include="@(ResourcesWithNoCulture)" Condition="'%(Extension)' == '.resx'">
418                         <Output TaskParameter="Include" ItemName="ResxWithNoCulture"/>
419                 </CreateItem>
420
421                 <CreateItem Include="@(ResourcesWithNoCulture)" Condition="'%(Extension)' != '.resx'">
422                         <Output TaskParameter="Include" ItemName="NonResxWithNoCulture"/>
423                 </CreateItem>
424
425                 <CreateItem Include="@(ResourcesWithCulture)" Condition="'%(Extension)' == '.resx'">
426                         <Output TaskParameter="Include" ItemName="ResxWithCulture"/>
427                 </CreateItem>
428
429                 <CreateItem Include="@(ResourcesWithCulture)" Condition="'%(Extension)' != '.resx'">
430                         <Output TaskParameter="Include" ItemName="NonResxWithCulture"/>
431                 </CreateItem>
432         </Target>
433
434         <!-- Copy non-resx resources to their manifest resource names, this is what the compiler expects -->
435         <Target Name = "CopyNonResxEmbeddedResources"
436                 Condition = "'@(NonResxWithCulture)' != '' or '@(NonResxWithNoCulture)' != '' or '@(ManifestNonResxWithCulture)' != '' or '@(ManifestNonResxWithNoCulture)' != ''">
437
438                 <MakeDir Directories="$(IntermediateOutputPath)%(ManifestNonResxWithCulture.Culture)"/>
439                 <Copy SourceFiles = "@(NonResxWithCulture)"
440                         DestinationFiles = "@(ManifestNonResxWithCulture->'$(IntermediateOutputPath)%(Identity)')"
441                         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
442                         <Output TaskParameter = "DestinationFiles" ItemName = "ManifestNonResxWithCultureOnDisk"/>
443                         <Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
444                 </Copy>
445
446                 <Copy SourceFiles = "@(NonResxWithNoCulture)"
447                         DestinationFiles = "@(ManifestNonResxWithNoCulture->'$(IntermediateOutputPath)%(Identity)')"
448                         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
449                         <Output TaskParameter = "DestinationFiles" ItemName = "ManifestNonResxWithNoCultureOnDisk"/>
450                         <Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
451                 </Copy>
452         </Target>
453
454         <Target Name = "GenerateResources">
455                 <GenerateResource
456                         Sources = "@(ResxWithNoCulture)"
457                         UseSourcePath = "true"
458                         OutputResources = "@(ManifestResourceWithNoCultureName->'$(IntermediateOutputPath)%(Identity).resources')"
459                         Condition = "'@(ResxWithNoCulture)' != '' ">
460
461                         <Output TaskParameter = "OutputResources" ItemName = "ManifestResourceWithNoCulture"/>
462                         <Output TaskParameter = "FilesWritten" ItemName = "FileWrites"/>
463                 </GenerateResource>
464
465                 <GenerateResource
466                         Sources = "@(ResxWithCulture)"
467                         UseSourcePath = "true"
468                         OutputResources = "@(ManifestResourceWithCultureName->'$(IntermediateOutputPath)%(Identity).resources')"
469                         Condition = "'@(ResxWithCulture)' != '' ">
470
471                         <Output TaskParameter = "OutputResources" ItemName = "ManifestResourceWithCulture"/>
472                         <Output TaskParameter = "FilesWritten" ItemName = "FileWrites"/>
473                 </GenerateResource>
474         </Target>
475
476         <Target Name="GenerateSatelliteAssemblies"
477                 Inputs="@(ManifestResourceWithCulture);@(ManifestNonResxWithCultureOnDisk)"
478                 Outputs="$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll" >
479                 <!-- @(NonResxWithCulture) - rename files to ManifestNon.. and then use for AL -->
480                 <MakeDir Directories = "$(IntermediateOutputPath)%(ManifestResourceWithCulture.Culture)" Condition = "'@(ManifestResourceWithCulture)' != ''" />
481                 <MakeDir Directories = "$(IntermediateOutputPath)%(ManifestNonResxWithCultureOnDisk.Culture)" Condition = "'@(ManifestNonResxWithCultureOnDisk)' != ''" />
482
483                 <AL
484                         Culture = "%(Culture)"
485                         DelaySign="$(DelaySign)"
486                         EmbedResources = "@(ManifestResourceWithCulture);@(ManifestNonResxWithCultureOnDisk)"
487                         KeyFile="$(KeyOriginatorFile)"
488                         ToolExe="$(AlToolExe)"
489                         ToolPath="$(AlToolPath)"
490                         OutputAssembly = "$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll" >
491                         <Output TaskParameter="OutputAssembly" ItemName="FileWrites"/>
492                 </AL>
493
494
495                 <CreateItem
496                         Include = "$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll"
497                         AdditionalMetadata = "Culture=%(Culture)"
498                         Condition = "'@(ManifestResourceWithCulture)' != '' or '@(ManifestNonResxWithCultureOnDisk)' != ''">
499                         <Output TaskParameter = "Include" ItemName = "IntermediateSatelliteAssemblies" />
500                 </CreateItem>
501         </Target>
502
503         <PropertyGroup>
504                 <CompileLicxFilesDependsOn></CompileLicxFilesDependsOn>
505         </PropertyGroup>
506
507         <Target Name = "CompileLicxFiles"
508                 Condition = "'@(LicxFiles)' != ''"
509                 DependsOnTargets = "$(CompileLicxFilesDependsOn)"
510                 Outputs = "$(IntermediateOutputPath)$(TargetFileName).licenses">
511                 <LC
512                         Sources = "@(LicxFiles)"
513                         LicenseTarget = "$(TargetFileName)"
514                         OutputDirectory = "$(IntermediateOutputPath)"
515                         OutputLicense = "$(IntermediateOutputPath)$(TargetFileName).licenses"
516                         ReferencedAssemblies = "@(ReferencePath);@(_ResolvedDependencyFiles)"
517                         ToolPath = "$(LCToolPath)"
518                         ToolExe = "$(LCToolExe)">
519
520                         <Output TaskParameter="OutputLicense" ItemName="CompiledLicenseFile"/>
521                         <Output TaskParameter="OutputLicense" ItemName="FileWrites"/>
522                 </LC>
523         </Target>
524
525         <!-- Assign target paths to files that will need to be copied along with the project -->
526         <Target Name = "AssignTargetPaths">
527                 <AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)">
528                         <Output TaskParameter="AssignedFiles" ItemName="NoneWithTargetPath"/>
529                 </AssignTargetPath>
530
531                 <AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)">
532                         <Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath"/>
533                 </AssignTargetPath>
534
535                 <AssignTargetPath Files="@(EmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)">
536                         <Output TaskParameter="AssignedFiles" ItemName="EmbeddedResourceWithTargetPath"/>
537                 </AssignTargetPath>
538         </Target>
539
540         <Target Name="DeployOutputFiles"
541                 DependsOnTargets="PrepareResources;CoreCompile;_CopyDeployFilesToOutputDirectory;_CopyAppConfigFile">
542
543                 <Copy 
544                         SourceFiles="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb"
545                         Condition="'$(OutDir)' != '' and Exists('$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb')"
546                         DestinationFolder="$(OutDir)"
547                         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" >
548                         <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
549                 </Copy>
550
551                 <Copy SourceFiles="@(IntermediateAssembly)" Condition="'$(OutDir)' != '' and Exists ('@(IntermediateAssembly)')" DestinationFolder="$(OutDir)" SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
552                         <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
553                 </Copy>
554
555                 <Copy
556                         SourceFiles = "@(IntermediateSatelliteAssemblies)"
557                         DestinationFiles = "@(IntermediateSatelliteAssemblies->'$(OutDir)\%(Culture)\$(AssemblyName).resources.dll')"
558                         Condition = "'@(IntermediateSatelliteAssemblies)' != ''"
559                         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)">
560                         <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
561                 </Copy>
562         </Target>
563
564         <Target Name="_CopyDeployFilesToOutputDirectory"
565                 DependsOnTargets="GetCopyToOutputDirectoryItems;
566                         _CopyDeployFilesToOutputDirectoryAlways;
567                         _CopyDeployFilesToOutputDirectoryPreserveNewest"/>
568
569         <Target Name="_CopyDeployFilesToOutputDirectoryPreserveNewest"
570                 Condition="'@(ItemsToCopyToOutputDirectoryPreserveNewest)' != ''"
571                 Inputs="@(ItemsToCopyToOutputDirectoryPreserveNewest)"
572                 Outputs="@(ItemsToCopyToOutputDirectoryPreserveNewest->'$(OutDir)%(TargetPath)')">
573
574                 <Copy SourceFiles="@(ItemsToCopyToOutputDirectoryPreserveNewest)"
575                         DestinationFiles="@(ItemsToCopyToOutputDirectoryPreserveNewest->'$(OutDir)%(TargetPath)')"
576                         SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"> 
577                         <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
578                 </Copy>
579         </Target>
580
581         <!-- Copy if newer -->
582         <Target Name="_CopyDeployFilesToOutputDirectoryAlways"
583                 Condition="'@(ItemsToCopyToOutputDirectoryAlways)' != ''">
584
585                 <Copy SourceFiles="@(ItemsToCopyToOutputDirectoryAlways)"
586                         DestinationFiles="@(ItemsToCopyToOutputDirectoryAlways->'$(OutDir)%(TargetPath)')">
587                         <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
588                 </Copy>
589         </Target>
590
591
592         <Target Name="_CopyAppConfigFile" Condition="'@(AppConfigWithTargetPath)' != ''"
593                 Inputs="@(AppConfigWithTargetPath)"
594                 Outputs="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')">
595
596                 <Copy SourceFiles="@(AppConfigWithTargetPath)"
597                         DestinationFiles="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')">
598                         <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
599                 </Copy>
600         </Target>
601
602         <Target Name="GetTargetPath" Outputs="$(TargetPath)"/>
603
604         <Target Name="GetCopyToOutputDirectoryItems"
605                 Outputs="@(AllItemsFullPathWithTargetPath)"
606                 DependsOnTargets="AssignTargetPaths;SplitProjectReferencesByExistent">
607
608                 <!-- FIXME: handle .vcproj
609                      FIXME: Private ProjectReferences are honored only in 3.5
610                 -->
611                 <MSBuild
612                         Projects="@(ProjectReferenceWithConfigurationExistent)"
613                         Targets="GetCopyToOutputDirectoryItems"
614                         Condition="'@(ProjectReferenceWithConfigurationExistent)' != '' and '%(ProjectReferenceWithConfigurationExistent.Private)' != 'false'">
615
616                         <Output TaskParameter="TargetOutputs" ItemName="AllChildProjectItemsWithTargetPath"/>
617                 </MSBuild>
618
619                 <!-- Process items from child project. The outputs need to have full path
620                      as they'll be used from other projects -->
621
622                 <CreateItem
623                         Include="@(AllChildProjectItemsWithTargetPath->'%(FullPath)')"
624                         Condition="'%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
625
626                         <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
627                         <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
628                                 Condition="'%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
629                         <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
630                                 Condition="'%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
631
632                 </CreateItem>
633
634                 <!-- Process _this_ project's items -->
635
636                 <CreateItem
637                         Include="@(NoneWithTargetPath->'%(FullPath)')"
638                         Condition="'%(NoneWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(NoneWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
639                         <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
640                         <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
641                                 Condition="'%(NoneWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
642                         <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
643                                 Condition="'%(NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
644                 </CreateItem>
645
646                 <CreateItem
647                         Include="@(ContentWithTargetPath->'%(FullPath)')"
648                         Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(ContentWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
649                         <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
650                         <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
651                                 Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
652                         <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
653                                 Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
654                 </CreateItem>
655
656                 <CreateItem
657                         Include="@(EmbeddedResourceWithTargetPath->'%(FullPath)')"
658                         Condition="'%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
659                         <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
660                         <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
661                                 Condition="'%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
662                         <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
663                                 Condition="'%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
664                 </CreateItem>
665
666         </Target>
667
668         <!-- Pre/Post BuildEvents -->
669         <PropertyGroup>
670                 <PreBuildEventDependsOn />
671         </PropertyGroup>
672
673         <Target Name="PreBuildEvent"
674                 Condition="'$(PreBuildEvent)' != ''"
675                 DependsOnTargets="$(PreBuildEventDependsOn)">
676
677                 <Exec WorkingDirectory="$(OutDir)" Command="$(PreBuildEvent)" />
678         </Target>
679
680         <!-- PostBuildEvent depends on $(RunPostBuildEvent)
681
682                 Default: OnBuildSuccess
683                 OnBuildSuccess: Run after a successful build
684                 OnOutputUpdated: Run only if the output assembly got updates
685                 Always: Run always
686         -->
687         <PropertyGroup>
688                 <PostBuildEventDependsOn />
689         </PropertyGroup>
690
691         <!-- this gets invoked in two cases, from CoreBuildDependsOn, if the build completes
692              successfully, OR from OnError in CoreBuild, if the build failed and $(RunPostBuildEvent)
693              is 'Always' or 'OnOutputUpdated'. Invoke $(PostBuildEvent) if its either Empty (== OnBuildSuccess)
694              or OnBuildSuccess or Always OR (OnOutputUpdated and output assembly got updated) -->
695         <Target Name="PostBuildEvent"
696                 Condition="'$(PostBuildEvent)' != '' and
697                         ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or
698                           '$(_AssemblyModifiedTimeBeforeCompile)' != '$(_AssemblyModifiedTimeAfterCompile)')"
699                 DependsOnTargets="$(PostBuildEventDependsOn)">
700
701                 <Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" />
702         </Target>
703
704         <!-- Timestamp the output assemblies, required for PostBuildEvent -->
705         <Target Name="_TimestampBeforeCompile" Condition="'$(RunPostBuildEvent)' == 'OnOutputUpdated'">
706                 <CreateItem Include="%(IntermediateAssembly.ModifiedTime)">
707                         <Output TaskParameter="Include" PropertyName="_AssemblyModifiedTimeBeforeCompile" />
708                 </CreateItem>
709         </Target>
710         <Target Name="_TimestampAfterCompile" Condition="'$(RunPostBuildEvent)' == 'OnOutputUpdated'">
711                 <CreateItem Include="%(IntermediateAssembly.ModifiedTime)">
712                         <Output TaskParameter="Include" PropertyName="_AssemblyModifiedTimeAfterCompile" />
713                 </CreateItem>
714         </Target>
715
716         <!-- Rebuild -->
717         <PropertyGroup>
718                 <RebuildDependsOn>
719                         BeforeRebuild;
720                         Clean;
721                         $(MSBuildProjectDefaultTargets);
722                         AfterRebuild;
723                 </RebuildDependsOn>
724
725                 <RebuildDependsOn Condition="'$(MSBuildProjectDefaultTargets)' == 'Rebuild'">
726                         BeforeRebuild;
727                         Clean;
728                         Build;
729                         AfterRebuild;
730                 </RebuildDependsOn>
731         </PropertyGroup>
732
733         <Target Name="BeforeRebuild" />
734         <Target Name="AfterRebuild" />
735
736         <Target Name="Rebuild"
737                 DependsOnTargets="$(RebuildDependsOn)"
738                 Outputs="$(TargetPath)"/>
739
740         <!-- Clean -->
741         <Target Name="_RecordCleanFile"
742                 DependsOnTargets="_GetCompileOutputsForClean">
743
744                 <!-- add to list of previous writes for this platform/config -->
745
746                 <ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
747                         <Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
748                 </ReadLinesFromFile>
749
750                 <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
751                         <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
752                 </RemoveDuplicates>
753
754                 <!-- CopyLocal files: In case all the projects build to common output
755                      directory, then other projects might depend on some of these
756                      CopyLocal files, so delete only the ones under *this* project
757                      directory -->
758                 <FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)">
759                         <Output TaskParameter="InPath" ItemName="FileWrites"/>
760                 </FindUnderPath>
761
762                 <WriteLinesToFile
763                         File="$(IntermediateOutputPath)$(CleanFile)"
764                         Lines="@(CombinedFileWrites)"
765                         Overwrite="true"/>
766         </Target>
767
768         <PropertyGroup>
769                 <CleanDependsOn>
770                         BeforeClean;
771                         CleanReferencedProjects;
772                         CoreClean;
773                         AfterClean
774                 </CleanDependsOn>
775         </PropertyGroup>
776
777         <Target Name="_GetCompileOutputsForClean">
778                 <!-- assembly and debug file in the *intermediate output path* -->
779                 <CreateItem Include="@(IntermediateAssembly)" Condition="Exists('@(IntermediateAssembly)')">
780                         <Output TaskParameter="Include" ItemName="FileWrites"/>
781                 </CreateItem>
782
783                 <CreateItem Include="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb"
784                         Condition="Exists('$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb')">
785                         <Output TaskParameter="Include" ItemName="FileWrites"/>
786                 </CreateItem>
787         </Target>
788
789         <!-- Get the list of files written, for clean -->
790         <Target Name="_GetCleanFileWrites"
791                 DependsOnTargets="_GetCompileOutputsForClean">
792                 <ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
793                         <Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
794                 </ReadLinesFromFile>
795         </Target>
796
797         <Target Name="CleanReferencedProjects"
798                 DependsOnTargets="AssignProjectConfigurations">
799
800                 <!-- If building from .sln.proj or from IDE, clean will get handled by them,
801                      else we are building a project directly, from the command line, so
802                      clean the referenced projects -->
803                 <MSBuild Projects="@(ProjectReferenceWithConfigurationExistent)"
804                         Targets="Clean"
805                         Condition=" '$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true' and '@(ProjectReferenceWithConfigurationExistent)' != ''" />
806
807         </Target>
808
809         <Target Name="Clean" DependsOnTargets="$(CleanDependsOn)"/>
810
811         <!-- Override in project to run before/after clean tasks -->
812         <Target Name="BeforeClean" />
813         <Target Name="AfterClean" />
814
815         <Target Name="CoreClean" DependsOnTargets="_GetCleanFileWrites">
816                 <Delete Files="@(PreviousFileWrites);@(FileWrites)" TreatErrorsAsWarnings="true"/>
817
818                 <!-- all previous files written for this platform/config have been deleted,
819                      we can safely remove the file list now -->
820                 <Delete Files="$(IntermediateOutputPath)$(CleanFile)" TreatErrorsAsWarnings="true" />
821         </Target>
822
823         <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter\*"
824                 Condition="'$(ImportByWildcardAfterMicrosoftCommonTargets)' == 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportAfter')"/>
825 </Project>