2017-09-05 21:44:25 +00:00
|
|
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2019-07-11 00:43:29 +00:00
|
|
|
<Target Name="CalculateTemplatesVersion"
|
|
|
|
DependsOnTargets="SetSdkVersionInfo">
|
|
|
|
<PropertyGroup>
|
|
|
|
<MicrosoftNETCoreAppVersionPreReleaseSeparator>$(MicrosoftNETCoreAppPackageVersion.IndexOf('-'))</MicrosoftNETCoreAppVersionPreReleaseSeparator>
|
|
|
|
<MicrosoftNETCoreAppMajorMinorPatchVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreAppMajorMinorPatchVersion>
|
|
|
|
<MicrosoftNETCoreAppMajorMinorPatchVersion Condition=" '$(MicrosoftNETCoreAppVersionPreReleaseSeparator)' != -1 ">$(MicrosoftNETCoreAppPackageVersion.Substring(0, $(MicrosoftNETCoreAppVersionPreReleaseSeparator)))</MicrosoftNETCoreAppMajorMinorPatchVersion>
|
2019-07-16 00:22:56 +00:00
|
|
|
<BundledTemplatesVersion>$(MicrosoftNETCoreAppMajorMinorPatchVersion)</BundledTemplatesVersion>
|
|
|
|
<BundledTemplatesVersion Condition=" '$(DropSuffix)' != 'true' And '$(VersionSuffix)' != '' ">$(BundledTemplatesVersion)-$(VersionSuffix)</BundledTemplatesVersion>
|
2019-07-11 00:43:29 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
</Target>
|
|
|
|
|
2017-01-06 22:48:27 +00:00
|
|
|
<ItemGroup>
|
2017-12-02 04:07:48 +00:00
|
|
|
<BundledTemplate Include="Microsoft.DotNet.Common.ItemTemplates" Version="$(MicrosoftDotNetCommonItemTemplatesPackageVersion)" />
|
2018-10-02 18:21:50 +00:00
|
|
|
<BundledTemplate Include="Microsoft.DotNet.Common.ProjectTemplates.3.0" Version="$(MicrosoftDotNetCommonProjectTemplates30PackageVersion)" />
|
2019-01-08 08:13:34 +00:00
|
|
|
<BundledTemplate Include="Microsoft.DotNet.Test.ProjectTemplates.3.0" Version="$(MicrosoftDotNetTestProjectTemplates30PackageVersion)" />
|
2018-08-28 21:58:20 +00:00
|
|
|
<BundledTemplate Include="Microsoft.Dotnet.Wpf.ProjectTemplates" Version="$(MicrosoftDotnetWpfProjectTemplatesPackageVersion)" />
|
2018-08-29 20:12:43 +00:00
|
|
|
<BundledTemplate Include="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="$(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion)" />
|
2017-10-19 15:44:20 +00:00
|
|
|
|
2018-01-06 02:07:45 +00:00
|
|
|
<BundledTemplate Include="Microsoft.DotNet.Web.ItemTemplates" Version="$(AspNetCoreVersion)" />
|
2018-07-10 01:05:56 +00:00
|
|
|
<BundledTemplate Include="Microsoft.DotNet.Web.ProjectTemplates.3.0" Version="$(AspNetCoreVersion)" />
|
2019-07-08 18:20:32 +00:00
|
|
|
<BundledTemplate Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0" Version="$(AspNetCoreVersion)" />
|
2018-06-26 05:01:10 +00:00
|
|
|
|
|
|
|
<BundledTemplate Include="NUnit3.DotNetNew.Template" Version="$(NUnit3TemplatesVersion)" />
|
2017-01-06 22:48:27 +00:00
|
|
|
</ItemGroup>
|
2018-11-12 23:23:44 +00:00
|
|
|
|
|
|
|
<!-- 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>
|
|
|
|
|
2019-07-11 00:43:29 +00:00
|
|
|
<Target Name="LayoutTemplates"
|
|
|
|
DependsOnTargets="SetupBundledComponents;CalculateTemplatesVersion">
|
2019-05-30 00:45:45 +00:00
|
|
|
<ItemGroup Condition="!$(ProductMonikerRid.StartsWith('win'))">
|
|
|
|
<BundledTemplate Remove="Microsoft.Dotnet.Wpf.ProjectTemplates" />
|
|
|
|
<BundledTemplate Remove="Microsoft.Dotnet.WinForms.ProjectTemplates" />
|
|
|
|
</ItemGroup>
|
2019-07-11 00:43:29 +00:00
|
|
|
<Copy SourceFiles="%(BundledTemplate.RestoredNupkgPath)"
|
2019-07-15 17:25:17 +00:00
|
|
|
DestinationFolder="$(RedistLayoutPath)templates/$(BundledTemplatesVersion)"/>
|
2019-07-11 00:43:29 +00:00
|
|
|
</Target>
|
2019-05-30 00:45:45 +00:00
|
|
|
|
2019-07-11 00:43:29 +00:00
|
|
|
<Target Name="LayoutTemplatesForMSI"
|
|
|
|
DependsOnTargets="SetupBundledComponents;CalculateTemplatesVersion"
|
|
|
|
Condition="$(ProductMonikerRid.StartsWith('win'))">
|
2018-11-12 23:23:44 +00:00
|
|
|
<Copy SourceFiles="%(BundledTemplate.RestoredNupkgPath)"
|
2019-07-15 17:25:17 +00:00
|
|
|
DestinationFolder="$(TemplatesLayoutPath)templates/$(BundledTemplatesVersion)"/>
|
2018-11-12 23:23:44 +00:00
|
|
|
</Target>
|
2017-01-06 22:48:27 +00:00
|
|
|
</Project>
|