Include templates in layout
This commit is contained in:
parent
45c3817d65
commit
b1b9dfda09
5 changed files with 24 additions and 3 deletions
|
@ -53,6 +53,8 @@
|
||||||
$(RestoreSources);
|
$(RestoreSources);
|
||||||
https://dotnet.myget.org/F/msbuild/api/v3/index.json;
|
https://dotnet.myget.org/F/msbuild/api/v3/index.json;
|
||||||
https://dotnet.myget.org/F/nuget-build/api/v3/index.json;
|
https://dotnet.myget.org/F/nuget-build/api/v3/index.json;
|
||||||
|
https://dotnet.myget.org/F/templating/api/v3/index.json;
|
||||||
|
https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
|
||||||
</RestoreSources>
|
</RestoreSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<Import Project="targets\Versions.targets" />
|
<Import Project="targets\Versions.targets" />
|
||||||
<Import Project="targets\SetBuildDefaults.targets" />
|
<Import Project="targets\SetBuildDefaults.targets" />
|
||||||
<Import Project="targets\Branding.targets" />
|
<Import Project="targets\Branding.targets" />
|
||||||
|
<Import Project="targets\BundledTemplates.targets" />
|
||||||
<Import Project="targets\GenerateBundledVersions.targets" />
|
<Import Project="targets\GenerateBundledVersions.targets" />
|
||||||
<Import Project="targets\GenerateLayout.targets" />
|
<Import Project="targets\GenerateLayout.targets" />
|
||||||
<Import Project="targets\FileExtensions.targets" />
|
<Import Project="targets\FileExtensions.targets" />
|
||||||
|
|
|
@ -12,4 +12,21 @@
|
||||||
|
|
||||||
<BundledTemplate Include="NUnit3.DotNetNew.Template" Version="$(NUnit3TemplatesVersion)" />
|
<BundledTemplate Include="NUnit3.DotNetNew.Template" Version="$(NUnit3TemplatesVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- Restore bundled templates via PackageReference -->
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="@(BundledTemplate)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<BundledTemplate Update="@(BundledTemplate)">
|
||||||
|
<NupkgPathRelativeToPackageRoot>%(Identity)/%(Version)/%(Identity).%(Version).nupkg</NupkgPathRelativeToPackageRoot>
|
||||||
|
<RestoredNupkgPath>$(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(NupkgPathRelativeToPackageRoot)', '').ToLower())</RestoredNupkgPath>
|
||||||
|
</BundledTemplate>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="LayoutTemplates" DependsOnTargets="SetupBundledComponents">
|
||||||
|
<Copy SourceFiles="%(BundledTemplate.RestoredNupkgPath)"
|
||||||
|
DestinationFolder="$(SdkOutputDirectory)Templates/"/>
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
|
@ -181,7 +181,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
</BundledVersionsPropsContent>
|
</BundledVersionsPropsContent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<WriteLinesToFile File="$(SdkOutputDirectory)/$(BundledVersionsPropsFileName)"
|
<WriteLinesToFile File="$(SdkOutputDirectory)$(BundledVersionsPropsFileName)"
|
||||||
Lines="$(BundledVersionsPropsContent)"
|
Lines="$(BundledVersionsPropsContent)"
|
||||||
Overwrite="true" />
|
Overwrite="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -214,7 +214,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
</BundledBundledCliToolsPropsContent>
|
</BundledBundledCliToolsPropsContent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<WriteLinesToFile File="$(SdkOutputDirectory)/$(BundledBundledCliToolsPropsFileName)"
|
<WriteLinesToFile File="$(SdkOutputDirectory)$(BundledBundledCliToolsPropsFileName)"
|
||||||
Lines="$(BundledBundledCliToolsPropsContent)"
|
Lines="$(BundledBundledCliToolsPropsContent)"
|
||||||
Overwrite="true" />
|
Overwrite="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<Target Name="SetupBundledComponents" DependsOnTargets="GetCurrentRuntimeInformation;SetupFileExtensions;SetSdkVersionInfo;SetBuildDefaults">
|
<Target Name="SetupBundledComponents" DependsOnTargets="GetCurrentRuntimeInformation;SetupFileExtensions;SetSdkVersionInfo;SetBuildDefaults">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SdkOutputDirectory>$(RedistLayoutPath)sdk\$(SdkVersion)</SdkOutputDirectory>
|
<SdkOutputDirectory>$(RedistLayoutPath)sdk\$(SdkVersion)\</SdkOutputDirectory>
|
||||||
<CoreSetupBlobRootUrl>https://dotnetcli.azureedge.net/dotnet/</CoreSetupBlobRootUrl>
|
<CoreSetupBlobRootUrl>https://dotnetcli.azureedge.net/dotnet/</CoreSetupBlobRootUrl>
|
||||||
<DotnetExtensionsBlobRootUrl Condition="'$(DotnetExtensionsBlobRootUrl)' == ''">https://dotnetcli.blob.core.windows.net/dotnet/</DotnetExtensionsBlobRootUrl>
|
<DotnetExtensionsBlobRootUrl Condition="'$(DotnetExtensionsBlobRootUrl)' == ''">https://dotnetcli.blob.core.windows.net/dotnet/</DotnetExtensionsBlobRootUrl>
|
||||||
|
|
||||||
|
@ -217,6 +217,7 @@
|
||||||
CleanLayoutPath;
|
CleanLayoutPath;
|
||||||
ExtractBundledComponents;
|
ExtractBundledComponents;
|
||||||
GenerateBundledVersions;
|
GenerateBundledVersions;
|
||||||
|
LayoutTemplates;
|
||||||
RetargetTools"
|
RetargetTools"
|
||||||
AfterTargets="Build">
|
AfterTargets="Build">
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue