2016-06-27 18:45:51 +00:00
<?xml version="1.0" encoding="utf-8"?>
2016-06-28 02:09:30 +00:00
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2016-07-26 04:29:59 +00:00
<Import Project="Microsoft.DotNet.Cli.tasks" />
2016-07-21 03:42:23 +00:00
<Import Project="prepare/CheckPrereqs.targets" />
2016-06-29 07:41:38 +00:00
<Target Name="Prepare"
2017-02-01 01:31:37 +00:00
DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestoreSrcPackages;RestoreToolsPackages" />
2016-06-27 18:45:51 +00:00
2016-06-29 07:41:38 +00:00
<Target Name="Init"
2017-03-08 19:10:53 +00:00
DependsOnTargets="PrintBuildInfo;
SetTelemetryProfile;
2016-07-21 03:42:23 +00:00
BuildDotnetCliBuildFramework;
CheckPrereqs;">
</Target>
2017-03-08 19:10:53 +00:00
<Target Name="PrintBuildInfo">
<Message Text="Host info - Rid: $(HostRid), OSName: $(HostOSName)" Importance="High" />
<Message Text="Build info - Rid: $(Rid), Architecture: $(Architecture), OSName: $(OSName)" Importance="High" />
<Message Text="If you intended to use a different Rid, Architecture, or OSName run the following command to generate your build state:" Importance="High" />
<Message Text="dotnet msbuild build.proj /p:Architecture=Architecture /p:Rid=Rid /p:OSName=OSName /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles" Importance="High" />
</Target>
2017-02-16 03:37:51 +00:00
<Target Name="SetTelemetryProfile"
2016-07-21 03:42:23 +00:00
DependsOnTargets="BuildDotnetCliBuildFramework" >
2016-07-11 19:46:27 +00:00
<SetEnvVar Name="DOTNET_CLI_TELEMETRY_PROFILE" Value="$(DOTNET_CLI_TELEMETRY_PROFILE);https://github.com/dotnet/cli;$(CommitHash)" />
2016-06-27 18:45:51 +00:00
</Target>
2016-06-28 23:19:42 +00:00
2017-02-16 03:37:51 +00:00
<Target Name="DownloadHostAndSharedFxArtifacts">
2016-06-29 07:41:38 +00:00
2017-01-05 20:07:03 +00:00
<PropertyGroup>
<OverwriteExtractionDestination>%(_DownloadAndExtractItem.OverwriteDestination)</OverwriteExtractionDestination>
<OverwriteExtractionDestination Condition="'$(OverwriteExtractionDestination)' == ''">True</OverwriteExtractionDestination>
</PropertyGroup>
2016-06-29 07:41:38 +00:00
<DownloadFile Condition=" '@(_DownloadAndExtractItem)' != '' "
Uri="%(_DownloadAndExtractItem.Url)"
DestinationPath="%(_DownloadAndExtractItem.DownloadFileName)" />
2017-04-28 01:04:19 +00:00
<ZipFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND $([System.String]::new('%(_DownloadAndExtractItem.DownloadFileName)').EndsWith('.zip')) "
2016-07-26 04:29:59 +00:00
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
2017-01-05 20:07:03 +00:00
OverwriteDestination="$(OverwriteExtractionDestination)" />
2016-07-26 04:29:59 +00:00
2017-04-28 01:04:19 +00:00
<TarGzFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND $([System.String]::new('%(_DownloadAndExtractItem.DownloadFileName)').EndsWith('.tar.gz')) "
2016-07-26 04:29:59 +00:00
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
2017-01-05 20:07:03 +00:00
OverwriteDestination="$(OverwriteExtractionDestination)" />
2016-06-29 07:41:38 +00:00
</Target>
2016-07-21 03:42:23 +00:00
2016-10-29 08:04:20 +00:00
<Target Name="RestoreSrcPackages"
DependsOnTargets="SetupRestoreSrcPackagesInputsOutputs;Init"
Inputs="@(RestoreSrcPackagesInput)"
Outputs="@(RestoreSrcPackagesInput->'%(RelativeDir)/obj/project.assets.json');@(RestoreSrcPackagesInput->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.props');@(RestoreSrcPackagesInput->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.targets')">
<CallTarget Targets="CleanSrcLockFiles" />
2017-02-24 01:07:26 +00:00
<DotNetRestore ToolPath="$(Stage0Directory)"
2016-11-12 07:46:29 +00:00
ProjectPath=""%(RestoreSrcPackagesInput.FullPath)"" />
2016-10-29 08:04:20 +00:00
</Target>
<Target Name="CleanSrcLockFiles" >
<ItemGroup>
<SrcLockFiles Include="$(RepoRoot)/src/**/project.assets.json;$(RepoRoot)/src/**/*.csproj.nuget.g.props;$(RepoRoot)/src/**/*.csproj.nuget.g.targets" />
</ItemGroup>
<Delete Files="@(SrcLockFiles)" />
</Target>
<Target Name="SetupRestoreSrcPackagesInputsOutputs">
<ItemGroup>
<RestoreSrcPackagesInput Include="$(RepoRoot)/src/**/*.csproj" Exclude="$(RepoRoot)/src/**/%24projectName%24.csproj"/>
</ItemGroup>
</Target>
<Target Name="RestoreToolsPackages"
DependsOnTargets="SetupRestoreToolsPackagesInputsOutputs;Init"
Inputs="@(RestoreToolsPackagesInput)"
Outputs="@(RestoreToolsPackagesInput->'%(RelativeDir)/obj/project.assets.json');@(RestoreToolsPackagesInput->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.props');@(RestoreToolsPackagesInput->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.targets')">
<CallTarget Targets="CleanToolsLockFiles" />
2017-02-24 01:07:26 +00:00
<DotNetRestore ToolPath="$(Stage0Directory)"
2017-05-12 21:04:45 +00:00
ProjectPath=""%(RestoreToolsPackagesInput.FullPath)""
AdditionalParameters="/p:UsePortableLinuxSharedFramework=$(UsePortableLinuxSharedFramework)" />
2016-10-29 08:04:20 +00:00
</Target>
<Target Name="CleanToolsLockFiles" >
<ItemGroup>
<ToolsLockFiles Include="$(RepoRoot)/tools/**/project.assets.json;$(RepoRoot)/tools/**/*.csproj.nuget.g.props;$(RepoRoot)/tools/**/*.csproj.nuget.g.targets" />
</ItemGroup>
<Delete Files="@(ToolsLockFiles)" />
</Target>
<Target Name="SetupRestoreToolsPackagesInputsOutputs">
<ItemGroup>
<RestoreToolsPackagesInput Include="$(RepoRoot)/tools/**/*.csproj" />
</ItemGroup>
</Target>
2016-07-22 23:01:32 +00:00
</Project>