зеркало из https://github.com/App-vNext/corefx.git
87 строки
3.1 KiB
XML
87 строки
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<PropertyGroup>
|
|
<BuildToolsVersion>1.0.11-prerelease</BuildToolsVersion>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
|
|
<SourceDir>$(ProjectDir)src\</SourceDir>
|
|
<BinDir>$(ProjectDir)bin\</BinDir>
|
|
<ToolsDir>$(BinDir)tools\</ToolsDir>
|
|
|
|
<NuGetToolPath>$(ToolsDir)NuGet.exe</NuGetToolPath>
|
|
|
|
<NuGetConfigFile>$(SourceDir)nuget\NuGet.Config</NuGetConfigFile>
|
|
<NuGetConfigCommandLine
|
|
Condition="Exists($(NuGetConfigFile))">-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
|
|
<PackagesDir>$(SourceDir)packages\</PackagesDir>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageConfigs Include="$(SourceDir)*\packages.config" />
|
|
</ItemGroup>
|
|
|
|
<UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
|
|
<ParameterGroup>
|
|
<Address ParameterType="System.String" Required="true"/>
|
|
<FileName ParameterType="System.String" Required="true" />
|
|
</ParameterGroup>
|
|
<Task>
|
|
<Reference Include="System" />
|
|
<Code Type="Fragment" Language="cs">
|
|
<![CDATA[
|
|
var directory = System.IO.Path.GetDirectoryName(FileName);
|
|
System.IO.Directory.CreateDirectory(directory);
|
|
new System.Net.WebClient().DownloadFile(Address, FileName);
|
|
]]>
|
|
</Code>
|
|
</Task>
|
|
</UsingTask>
|
|
|
|
<Target Name="Clean">
|
|
<!-- Execute build tools -->
|
|
<MSBuild
|
|
Projects="$(ToolsDir)fxbuild.proj"
|
|
SkipNonexistentProjects="true"
|
|
Targets="Clean" />
|
|
</Target>
|
|
|
|
<Target Name="Build" DependsOnTargets="_RestoreBuildTools">
|
|
<!-- Execute build tools -->
|
|
<MSBuild
|
|
Projects="$(ToolsDir)fxbuild.proj"
|
|
Targets="Build" />
|
|
</Target>
|
|
|
|
<Target Name="BuildFxLocalDependency" DependsOnTargets="_RestoreBuildTools" Returns="$(ProducedPackages)">
|
|
<!-- Execute build tools -->
|
|
<MSBuild
|
|
Projects="$(ToolsDir)fxbuild.proj"
|
|
Targets="BuildFxLocalDependency">
|
|
<Output TaskParameter="TargetOutputs" ItemName="ProducedPackages" />
|
|
</MSBuild>
|
|
</Target>
|
|
|
|
<Target
|
|
Name="_RestoreBuildTools"
|
|
Condition="!Exists('$(PackagesDir)Microsoft.DotNet.BuildTools.$(BuildToolsVersion)') Or !Exists('$(ToolsDir)fxbuild.proj')">
|
|
<!-- Download latest nuget.exe -->
|
|
<DownloadFile
|
|
Condition="!Exists($(NuGetToolPath))"
|
|
Address="http://nuget.org/nuget.exe"
|
|
FileName="$(NuGetToolPath)" />
|
|
|
|
<!-- Restore build tools -->
|
|
<Exec
|
|
StandardOutputImportance="Low"
|
|
Command=""$(NuGetToolPath)" install Microsoft.DotNet.BuildTools -Prerelease -Version $(BuildToolsVersion) -o " $(PackagesDir) " $(NuGetConfigCommandLine)" />
|
|
|
|
<!-- Copy build tools to tools directory -->
|
|
<Exec
|
|
Command="xcopy /e /y "$(PackagesDir)Microsoft.DotNet.BuildTools.$(BuildToolsVersion)\lib\*" "$(ToolsDir)" > $(ToolsDir)BuildTools.xcopy.log" />
|
|
</Target>
|
|
|
|
</Project>
|