2017-06-08 22:25:32 +00:00
|
|
|
<Project ToolsVersion="15.0" DefaultTargets="EnsureDependencyRestored;CopySdkToOutput">
|
2016-12-03 22:19:54 +00:00
|
|
|
<!-- workaround for https://github.com/Microsoft/msbuild/issues/885 -->
|
|
|
|
<!-- renaming the property because the original property is a global property and therefore
|
|
|
|
cannot be redefined at runtime. -->
|
|
|
|
<PropertyGroup>
|
|
|
|
<CLIBuildDllPath>$([MSBuild]::Unescape($(CLIBuildDll)))</CLIBuildDllPath>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<UsingTask TaskName="DotNetRestore" AssemblyFile="$(CLIBuildDllPath)" />
|
|
|
|
|
|
|
|
<Target Name="CopySdkToOutput"
|
2017-06-08 00:27:34 +00:00
|
|
|
DependsOnTargets="PrepareBundledDependencyProps;
|
|
|
|
EnsureDependencyRestored;
|
2016-12-03 22:19:54 +00:00
|
|
|
GetSdkItemsToCopy"
|
2017-06-08 00:27:34 +00:00
|
|
|
Condition="'$(SdkLayoutDirectory)' != ''"
|
2016-12-03 22:19:54 +00:00
|
|
|
Inputs="@(SdkContent)"
|
|
|
|
Outputs="@(SdkContent->'$(SdkLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')">
|
|
|
|
<Copy SourceFiles="@(SdkContent)"
|
|
|
|
DestinationFiles="@(SdkContent->'$(SdkLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
|
2016-12-05 06:31:58 +00:00
|
|
|
|
2017-06-08 00:27:34 +00:00
|
|
|
<Message Text="Copied Sdk $(DependencyPackageName) from $(DependencyNuPkgPath) to $(SdkLayoutDirectory)."
|
2016-12-05 06:31:58 +00:00
|
|
|
Importance="High" />
|
2016-12-03 22:19:54 +00:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="GetSdkItemsToCopy">
|
|
|
|
<ItemGroup>
|
2017-06-08 00:27:34 +00:00
|
|
|
<SdkContent Include="$(DependencyNuPkgPath)/**/*"
|
|
|
|
Exclude="$(DependencyNuPkgPath)/$(DependencyPackageName).nuspec;
|
|
|
|
$(DependencyNuPkgPath)/$(DependencyPackageName).$(DependencyPackageVersion).nupkg;
|
|
|
|
$(DependencyNuPkgPath)/$(DependencyPackageName).$(DependencyPackageVersion).nupkg.sha512" />
|
2016-12-03 22:19:54 +00:00
|
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
|
2017-06-08 00:27:34 +00:00
|
|
|
<Target Name="EnsureDependencyRestored"
|
|
|
|
Condition="!Exists('$(DependencyNuPkgPath)/$(DependencyPackageName.ToLower()).nuspec')">
|
2016-12-03 22:19:54 +00:00
|
|
|
<DotNetRestore ToolPath="$(Stage0Directory)"
|
|
|
|
ProjectPath="$(MSBuildThisFileDirectory)/sdks/sdks.csproj"
|
2017-06-08 00:27:34 +00:00
|
|
|
AdditionalParameters="/p:DependencyPackageName=$(DependencyPackageName) /p:DependencyPackageVersion=$(DependencyPackageVersion)" />
|
2016-12-03 22:19:54 +00:00
|
|
|
</Target>
|
|
|
|
|
2017-06-08 00:27:34 +00:00
|
|
|
<Target Name="PrepareBundledDependencyProps">
|
2016-12-03 22:19:54 +00:00
|
|
|
<PropertyGroup>
|
2017-06-08 00:27:34 +00:00
|
|
|
<DependencyNuPkgPath>$(NuGetPackagesDir)/$(DependencyPackageName.ToLower())/$(DependencyPackageVersion.ToLower())</DependencyNuPkgPath>
|
2016-12-03 22:19:54 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
</Target>
|
|
|
|
</Project>
|