dotnet-installer/build/Microsoft.DotNet.Cli.BundledTemplates.proj
Livar 4b82852d56 Updating the version of msbuild to 15.1.0-preview-000516-03 (#5266)
* Updating the version of msbuild to 15.1.0-preview-000516-03

* Remove test that assumes props/targets imports

The test ItAddsRefBetweenImports validated that the MSBuild XML model contained new project references between the props and targets imports. While useful be fore the SDK attribute, the test no longer adds value since the SDK is added implicitly, guaranteeing it wraps the remaining project contents.

* Move MSBuild to 15.1.0-preview-000509-03

This is the last msbuild version prior to the change of MSBuild's dependencies to include .NET 1.1 components.

* Move MSBuild invocations to use dirs.props/dirs.tasks

* Put back the test targets. We'll unify later.

* Remove dirs.props props from templates msbuild invocation
2017-01-11 01:49:22 -08:00

36 lines
1.8 KiB
XML

<Project ToolsVersion="15.0" DefaultTargets="CopyTemplateToOutput">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
<Target Name="CopyTemplateToOutput"
DependsOnTargets="PrepareBundledTemplateProps;
EnsureTemplateRestored;
GetTemplateItemsToCopy"
Inputs="@(TemplateContent)"
Outputs="@(TemplateContent->'$(TemplateLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')">
<Copy SourceFiles="@(TemplateContent)"
DestinationFiles="@(TemplateContent->'$(TemplateLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
<Message Text="Copied template $(TemplatePackageName) from $(TemplateNuPkgPath) to $(TemplateLayoutDirectory)."
Importance="High" />
</Target>
<Target Name="GetTemplateItemsToCopy">
<ItemGroup>
<TemplateContent Include="$(TemplateNuPkgPath)/$(TemplatePackageName.ToLower()).$(TemplatePackageVersion.ToLower()).nupkg" />
</ItemGroup>
</Target>
<Target Name="EnsureTemplateRestored"
Condition="!Exists('$(TemplateNuPkgPath)/$(TemplatePackageName.ToLower()).nuspec')">
<DotNetRestore ToolPath="$(Stage0Directory)"
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
AdditionalParameters="/p:TemplatePackageName=$(TemplatePackageName) /p:TemplatePackageVersion=$(TemplatePackageVersion)" />
</Target>
<Target Name="PrepareBundledTemplateProps">
<PropertyGroup>
<TemplateNuPkgPath>$(NuGetPackagesDir)/$(TemplatePackageName.ToLower())/$(TemplatePackageVersion.ToLower())</TemplateNuPkgPath>
</PropertyGroup>
</Target>
</Project>