2017-01-06 22:48:27 +00:00
|
|
|
<Project ToolsVersion="15.0" DefaultTargets="CopyTemplateToOutput">
|
2017-08-10 05:30:20 +00:00
|
|
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
2017-01-11 09:49:22 +00:00
|
|
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
|
2017-01-06 22:48:27 +00:00
|
|
|
|
|
|
|
<Target Name="CopyTemplateToOutput"
|
|
|
|
DependsOnTargets="PrepareBundledTemplateProps;
|
|
|
|
EnsureTemplateRestored;
|
|
|
|
GetTemplateItemsToCopy"
|
|
|
|
Inputs="@(TemplateContent)"
|
|
|
|
Outputs="@(TemplateContent->'$(TemplateLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')">
|
|
|
|
<Copy SourceFiles="@(TemplateContent)"
|
|
|
|
DestinationFiles="@(TemplateContent->'$(TemplateLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
|
|
|
|
|
2018-02-16 21:32:29 +00:00
|
|
|
<Message Text="Copied template $(TemplateFillInPackageName) from $(TemplateNuPkgPath) to $(TemplateLayoutDirectory)."
|
2017-01-06 22:48:27 +00:00
|
|
|
Importance="High" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="GetTemplateItemsToCopy">
|
|
|
|
<ItemGroup>
|
2018-02-16 21:32:29 +00:00
|
|
|
<TemplateContent Include="$(TemplateNuPkgPath)/$(TemplateFillInPackageName.ToLower()).$(TemplateFillInPackageVersion.ToLower()).nupkg" />
|
2017-01-06 22:48:27 +00:00
|
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="EnsureTemplateRestored"
|
2018-02-16 21:32:29 +00:00
|
|
|
Condition="!Exists('$(TemplateNuPkgPath)/$(TemplateFillInPackageName.ToLower()).nuspec')">
|
2017-08-11 23:13:43 +00:00
|
|
|
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
2017-01-06 22:48:27 +00:00
|
|
|
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
|
2018-02-16 21:32:29 +00:00
|
|
|
AdditionalParameters="/p:TargetFramework=netcoreapp1.0 /p:TemplateFillInPackageName=$(TemplateFillInPackageName) /p:TemplateFillInPackageVersion=$(TemplateFillInPackageVersion)" />
|
2017-01-06 22:48:27 +00:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="PrepareBundledTemplateProps">
|
|
|
|
<PropertyGroup>
|
2018-02-16 21:32:29 +00:00
|
|
|
<TemplateNuPkgPath>$(NuGetPackagesDir)/$(TemplateFillInPackageName.ToLower())/$(TemplateFillInPackageVersion.ToLower())</TemplateNuPkgPath>
|
2017-01-06 22:48:27 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
</Target>
|
|
|
|
</Project>
|