1 <Project DefaultTargets="Build">
3 <Import Project="$(MSBuildThisFileDirectory)directories.props" />
5 <!-- Build Properties -->
7 <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
8 <BuildWithAnalyzer Condition="'$(BuildWithAnalyzer)' == ''">False</BuildWithAnalyzer>
11 <!-- Projects to build -->
13 <ProjectToBuild Include="$(ProjectSrcDir)\$(Project)\$(Project).csproj" Condition="'$(Project)' != ''" />
14 <ProjectToBuild Include="$(ProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''" />
15 <ProjectToBuild Include="$(InternalProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''" />
18 <!-- Nuspec files to pack -->
20 <NuspecFiles Include="$(ProjectRootDir)pkg\*.nuspec" />
27 including the Artifacts/ directory and the obj/ directories for all projects.
32 <ProjectIntermediateAllFiles Include="$(ProjectSrcDir)**\obj\*" />
33 <ProjectIntermediateAllFiles Include="$(InternalProjectSrcDir)**\obj\*" />
34 <ProjectIntermediateDir Include="@(ProjectIntermediateAllFiles->'%(RootDir)%(Directory)'->Distinct())" />
38 <DirToRemove Include="$(OutputBaseDir)" />
39 <DirToRemove Include="@(ProjectIntermediateDir)" />
42 <RemoveDir Directories="@(DirToRemove)" />
51 <Target Name="Restore">
53 <MSBuild Projects="@(ProjectToBuild)"
54 Properties="Configuration=$(Configuration);RestoreSources=$(RestoreSources);BuildWithAnalyzer=$(BuildWithAnalyzer)"
55 BuildInParallel="false"
67 <MSBuild Projects="@(ProjectToBuild)"
68 Properties="Configuration=$(Configuration);BuildWithAnalyzer=$(BuildWithAnalyzer)"
69 BuildInParallel="true"
70 UseResultsCache="true"
73 <MSBuild Projects="@(ProjectToBuild)"
74 Properties="Configuration=$(Configuration)"
75 BuildInParallel="false"
76 Targets="CopyToArtifactsDirectory" />
83 Generate nuget packages.
87 <MSBuild Projects="$(MSBuildThisFileDirectory)pack.csproj"
88 Properties="NoBuild=True"
91 <MSBuild Projects="$(MSBuildThisFileDirectory)pack.csproj"
92 Properties="NoBuild=True;Version=$(Version);NuspecFile=%(NuspecFiles.Identity)"
100 Generate dummy assemblies of all projects.
102 <Target Name="Dummy">
105 <APIToolPath>$(MSBuildThisFileDirectory)..\tools\bin\APITool.dll</APIToolPath>
108 <MakeDir Directories="$(OutputDummyDir)" />
109 <Exec Command="dotnet $([System.IO.Path]::GetFullPath('$(APIToolPath)')) dummy $(OutputPublicDir)ref $(OutputDummyDir) " />