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>
9 <BuildDesignAssembly Condition="'$(BuildDesignAssembly)' == ''">False</BuildDesignAssembly>
12 <!-- Projects to build -->
14 <DesignProject Include="$(ProjectSrcDir)**\*.Design.csproj" />
15 <DesignProject Include="$(InternalProjectSrcDir)**\*.Design.csproj" />
17 <PublicProject Include="$(ProjectSrcDir)**\*.csproj" Condition="'$(Project)' == ''" />
18 <PublicProject Include="$(ProjectSrcDir)\$(Project)\$(Project).csproj"
19 Condition="'$(Project)' != '' And Exists('$(ProjectSrcDir)\$(Project)\$(Project).csproj') " />
20 <PublicProject Remove="@(DesignProject)" />
22 <InternalProject Include="$(InternalProjectSrcDir)**\*.csproj" Condition="'$(Project)' == '' " />
23 <InternalProject Include="$(InternalProjectSrcDir)\$(Project)\$(Project).csproj"
24 Condition="'$(Project)' != '' And Exists('$(InternalProjectSrcDir)\$(Project)\$(Project).csproj') " />
25 <InternalProject Remove="@(DesignProject)" />
27 <ProjectToBuild Include="@(DesignProject)" Condition="'$(BuildDesignAssembly)' == 'True' " />
28 <ProjectToBuild Include="@(PublicProject);@(InternalProject)" Condition="'$(BuildDesignAssembly)' != 'True' " />
31 <!-- Nuspec files to pack -->
33 <NuspecFiles Include="$(ProjectRootDir)pkg\**\*.nuspec" />
40 including the Artifacts/ directory and the obj and bin directories of all projects.
45 <ProjectIntermediateAllFiles Include="$(ProjectSrcDir)**\obj\**" />
46 <ProjectIntermediateAllFiles Include="$(ProjectSrcDir)**\bin\**" />
47 <ProjectIntermediateAllFiles Include="$(InternalProjectSrcDir)**\obj\**" />
48 <ProjectIntermediateAllFiles Include="$(InternalProjectSrcDir)**\bin\**" />
49 <ProjectIntermediateDir Include="@(ProjectIntermediateAllFiles->'%(RootDir)%(Directory)'->Distinct())" />
53 <DirToRemove Include="$(OutputBaseDir)" />
54 <DirToRemove Include="@(ProjectIntermediateDir)" />
57 <RemoveDir Directories="@(DirToRemove)" />
66 <Target Name="Restore">
68 <MSBuild Projects="@(ProjectToBuild)"
69 Properties="Configuration=$(Configuration);RestoreSources=$(RestoreSources);BuildWithAnalyzer=$(BuildWithAnalyzer)"
70 BuildInParallel="false"
82 <MSBuild Projects="@(ProjectToBuild)"
83 Properties="Configuration=$(Configuration);BuildWithAnalyzer=$(BuildWithAnalyzer)"
84 BuildInParallel="true"
85 UseResultsCache="true"
88 <MSBuild Projects="@(ProjectToBuild)"
89 Properties="Configuration=$(Configuration)"
90 BuildInParallel="false"
91 Targets="CopyToArtifactsDirectory" />
98 Generate nuget packages.
102 <MSBuild Projects="$(MSBuildThisFileDirectory)pack.csproj"
103 Properties="NoBuild=True"
106 <MSBuild Projects="$(MSBuildThisFileDirectory)pack.csproj"
107 Properties="NoBuild=True;Version=$(Version);NuspecFile=%(NuspecFiles.Identity)"
115 Generate dummy assemblies of all projects.
117 <Target Name="Dummy">
120 <APIToolPath>$(MSBuildThisFileDirectory)..\tools\bin\APITool.dll</APIToolPath>
123 <MakeDir Directories="$(OutputDummyDir)" />
124 <Exec Command="dotnet $([System.IO.Path]::GetFullPath('$(APIToolPath)')) dummy $(OutputPublicDir)ref $(OutputDummyDir) " />