dotnet-installer/build/Compile.targets
2017-03-01 00:45:02 -08:00

71 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="compile/LzmaArchive.targets" />
<ItemGroup>
<PublishOutputExtensions Include="$(ExeExtension);.dll;.pdb;.deps.json;.runtimeconfig.json" />
</ItemGroup>
<Target Name="Compile" DependsOnTargets="Prepare;
CompileCLI;
PublishSdks;
PublishTemplates;
BuildProjectsForNuGetPackages;
GetNuGetPackagesArchive;" />
<Target Name="CompileCLI">
<RemoveDir Directories="$(OutputDirectory)" />
<MakeDir Directories="$(OutputDirectory)"/>
<!-- Publish DotNet -->
<DotNetPublish ToolPath="$(Stage0Directory)"
Configuration="$(Configuration)"
ProjectPath="$(RootProject)" />
<ItemGroup>
<PdbsToClean Include="$(OutputDirectory)/sdk/**/*.pdb" />
</ItemGroup>
<Delete Files="@(PdbsToClean)" />
</Target>
<Target Name="PublishSdks"
DependsOnTargets="Prepare">
<ItemGroup>
<SdksToBundle Include="build/BundledSdks.proj">
<Properties>
CLIBuildDll=$(CLIBuildDll);
NuGetPackagesDir=$(NuGetPackagesDir);
SdkLayoutDirectory=$(SdkOutputDirectory)/Sdks/%(BundledSdk.Identity);
SdkPackageName=%(BundledSdk.Identity);
SdkPackageVersion=%(BundledSdk.Version);
Stage0Directory=$(Stage0Directory)
</Properties>
</SdksToBundle>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(SdksToBundle)">
</MSBuild>
</Target>
<Target Name="PublishTemplates"
DependsOnTargets="Prepare">
<ItemGroup>
<TemplatesToBundle Include="build/BundledTemplates.proj">
<Properties>
TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
TemplatePackageName=%(BundledTemplate.Identity);
TemplatePackageVersion=%(BundledTemplate.Version);
Stage0Directory=$(Stage0Directory)
</Properties>
</TemplatesToBundle>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(TemplatesToBundle)">
</MSBuild>
</Target>
</Project>