1 <Project DefaultTargets="Build">
3 <Import Project="$(MSBuildThisFileDirectory)directories.props" />
5 <!-- Common Properties -->
7 <PublicModuleListFile>$(PackageSrcDir)PublicModuleList.txt</PublicModuleListFile>
10 <!-- Build Properties -->
12 <Configuration>Release</Configuration>
15 <!-- Projects to build -->
17 <ProjectToBuild Include="$(ProjectSrcDir)\$(Project)\$(Project).csproj" Condition="'$(Project)' != ''" />
18 <ProjectToBuild Include="$(ProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''" />
25 including the Artifacts/ directory and the obj/ directories for all projects.
30 <ProjectIntermediateAllFiles Include="$(ProjectSrcDir)**\obj\*" />
31 <ProjectIntermediateDir Include="@(ProjectIntermediateAllFiles->'%(RootDir)%(Directory)'->Distinct())" />
35 <DirToRemove Include="$(OutputBaseDir)" />
36 <DirToRemove Include="@(ProjectIntermediateDir)" />
39 <RemoveDir Directories="@(DirToRemove)" />
47 Build all projects in src/ directory.
48 The output(.dll, .pdb, .xml) of the project specfied in
49 pkg/PublicModuleList.txt is copied to Artifacts/bin/public,
50 and the rest are copied to Artifacts/bin/platform.
52 <Target Name="Build" DependsOnTargets="Clean">
54 <MSBuild Projects="@(ProjectToBuild)"
55 Properties="Configuration=$(Configuration);RestoreSources=$(RestoreSources)"
58 <MSBuild Projects="@(ProjectToBuild)"
59 Properties="Configuration=$(Configuration);OutDir=$(OutputPlatformDir)"
60 BuildInParallel="true"
61 UseResultsCache="true"
64 <ReadLinesFromFile File="$(PublicModuleListFile)">
65 <Output TaskParameter="Lines" ItemName="PublicProject" />
69 <PlatformFiles Include="$(OutputPlatformDir)*" />
70 <_PublicFilesToMove Include="$(OutputPlatformDir)%(PublicProject.Identity).dll" />
71 <_PublicFilesToMove Include="$(OutputPlatformDir)%(PublicProject.Identity).pdb" />
72 <_PublicFilesToMove Include="$(OutputPlatformDir)%(PublicProject.Identity).xml" />
73 <PublicFilesToMove Include="@(_PublicFilesToMove)" Condition="'@(PlatformFiles)' == '@(_PublicFilesToMove)' and '%(Identity)' != '' " />
76 <MakeDir Directories="$(OutputPublicDir)" />
77 <Move SourceFiles="@(PublicFilesToMove)" DestinationFolder="$(OutputPublicDir)" />
79 <Message Text="Moved %(PublicFilesToMove.Filename)%(PublicFilesToMove.Extension) -> $(OutputPublicDir)%(PublicFilesToMove.Filename)%(PublicFilesToMove.Extension)" Importance="High" />