Add 3.1 templates
This commit is contained in:
parent
0386ae221d
commit
a3bb220185
3 changed files with 55 additions and 8 deletions
|
@ -60,20 +60,31 @@
|
|||
<MicrosoftWindowsDesktopPackageVersion>$(MicrosoftWindowsDesktopAppPackageVersion)</MicrosoftWindowsDesktopPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- 3.1 Template versions -->
|
||||
<MicrosoftDotnetWinFormsProjectTemplates31PackageVersion>$(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion)</MicrosoftDotnetWinFormsProjectTemplates31PackageVersion>
|
||||
<MicrosoftDotNetWpfProjectTemplates31PackageVersion>$(MicrosoftDotNetWpfProjectTemplatesPackageVersion)</MicrosoftDotNetWpfProjectTemplates31PackageVersion>
|
||||
<NUnit3Templates31PackageVersion>1.6.3</NUnit3Templates31PackageVersion>
|
||||
<MicrosoftDotNetCommonItemTemplates31PackageVersion>2.0.0-preview8.19373.1</MicrosoftDotNetCommonItemTemplates31PackageVersion>
|
||||
<MicrosoftDotNetCommonProjectTemplates31PackageVersion>$(MicrosoftDotNetCommonItemTemplates31PackageVersion)</MicrosoftDotNetCommonProjectTemplates31PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates31PackageVersion>1.0.2-beta4.19354.2</MicrosoftDotNetTestProjectTemplates31PackageVersion>
|
||||
<AspNetCorePackageVersionFor31Templates>$(AspNetCoreVersion)</AspNetCorePackageVersionFor31Templates>
|
||||
|
||||
<!-- 3.0 Template versions -->
|
||||
<MicrosoftDotnetWinFormsProjectTemplates30PackageVersion>$(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion)</MicrosoftDotnetWinFormsProjectTemplates30PackageVersion>
|
||||
<MicrosoftDotNetWpfProjectTemplates30PackageVersion>$(MicrosoftDotNetWpfProjectTemplatesPackageVersion)</MicrosoftDotNetWpfProjectTemplates30PackageVersion>
|
||||
<MicrosoftDotnetWinFormsProjectTemplates30PackageVersion>4.8.0-rc2.19462.10</MicrosoftDotnetWinFormsProjectTemplates30PackageVersion>
|
||||
<MicrosoftDotNetWpfProjectTemplates30PackageVersion>3.0.0-rc2.19459.11</MicrosoftDotNetWpfProjectTemplates30PackageVersion>
|
||||
<NUnit3Templates30PackageVersion>1.6.3</NUnit3Templates30PackageVersion>
|
||||
<MicrosoftDotNetCommonItemTemplates30PackageVersion>2.0.0-preview8.19373.1</MicrosoftDotNetCommonItemTemplates30PackageVersion>
|
||||
<MicrosoftDotNetCommonProjectTemplates30PackageVersion>$(MicrosoftDotNetCommonItemTemplates30PackageVersion)</MicrosoftDotNetCommonProjectTemplates30PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates30PackageVersion>1.0.2-beta4.19354.2</MicrosoftDotNetTestProjectTemplates30PackageVersion>
|
||||
<AspNetCorePackageVersionFor30Templates>$(AspNetCoreVersion)</AspNetCorePackageVersionFor30Templates>
|
||||
<AspNetCorePackageVersionFor30Templates>3.0.0-rc2.19461.12</AspNetCorePackageVersionFor30Templates>
|
||||
|
||||
<!-- 2.2 Template versions -->
|
||||
<NUnit3Templates22PackageVersion>1.6.0</NUnit3Templates22PackageVersion>
|
||||
<MicrosoftDotNetCommonItemTemplates22PackageVersion>1.0.2-beta4</MicrosoftDotNetCommonItemTemplates22PackageVersion>
|
||||
<MicrosoftDotNetCommonProjectTemplates22PackageVersion>$(MicrosoftDotNetCommonItemTemplates22PackageVersion)</MicrosoftDotNetCommonProjectTemplates22PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates22PackageVersion>1.0.2-beta4.19155.2</MicrosoftDotNetTestProjectTemplates22PackageVersion>
|
||||
<AspNetCorePackageVersionFor22Templates>2.2.6</AspNetCorePackageVersionFor22Templates>
|
||||
|
||||
<!-- 2.1 Template versions -->
|
||||
<NUnit3Templates21PackageVersion>1.5.3</NUnit3Templates21PackageVersion>
|
||||
<MicrosoftDotNetCommonItemTemplates21PackageVersion>1.0.2-beta3</MicrosoftDotNetCommonItemTemplates21PackageVersion>
|
||||
|
|
|
@ -2,6 +2,16 @@
|
|||
<Target Name="CalculateTemplatesVersions"
|
||||
DependsOnTargets="SetSdkVersionInfo">
|
||||
<PropertyGroup>
|
||||
<AspNetCore31VersionPreReleaseSeparator>$(AspNetCorePackageVersionFor31Templates.IndexOf('-'))</AspNetCore31VersionPreReleaseSeparator>
|
||||
<AspNetCore31VersionMajorMinorPatchVersion>$(AspNetCorePackageVersionFor31Templates)</AspNetCore31VersionMajorMinorPatchVersion>
|
||||
<AspNetCore31VersionMajorMinorPatchVersion Condition=" '$(AspNetCore1VersionPreReleaseSeparator)' != -1 ">$(AspNetCorePackageVersionFor31Templates.Substring(0, $(AspNetCore31VersionPreReleaseSeparator)))</AspNetCore31VersionMajorMinorPatchVersion>
|
||||
<BundledTemplates31MSIVersion>$(AspNetCore31VersionMajorMinorPatchVersion).$(GitCommitCount)</BundledTemplates31MSIVersion>
|
||||
<BundledTemplates31InstallPath>$(AspNetCore31VersionMajorMinorPatchVersion)</BundledTemplates31InstallPath>
|
||||
<BundledTemplates31InstallPath Condition=" '$(AspNetCore31VersionPreReleaseSeparator)' != -1 ">$(BundledTemplates31InstallPath)-$(VersionSuffix)</BundledTemplates31InstallPath>
|
||||
<Templates31VersionPatchSeparatorIndex>$([MSBuild]::Add($(AspNetCore31VersionMajorMinorPatchVersion.IndexOf('.')), 1))</Templates31VersionPatchSeparatorIndex>
|
||||
<Templates31VersionPatchSeparatorIndex>$(AspNetCore31VersionMajorMinorPatchVersion.IndexOf('.', $(Templates31VersionPatchSeparatorIndex)))</Templates31VersionPatchSeparatorIndex>
|
||||
<BundledTemplates31MajorMinorVersion>$(AspNetCore31VersionMajorMinorPatchVersion.Substring(0, $(Templates31VersionPatchSeparatorIndex)))</BundledTemplates31MajorMinorVersion>
|
||||
|
||||
<AspNetCore30VersionPreReleaseSeparator>$(AspNetCorePackageVersionFor30Templates.IndexOf('-'))</AspNetCore30VersionPreReleaseSeparator>
|
||||
<AspNetCore30VersionMajorMinorPatchVersion>$(AspNetCorePackageVersionFor30Templates)</AspNetCore30VersionMajorMinorPatchVersion>
|
||||
<AspNetCore30VersionMajorMinorPatchVersion Condition=" '$(AspNetCore30VersionPreReleaseSeparator)' != -1 ">$(AspNetCorePackageVersionFor30Templates.Substring(0, $(AspNetCore30VersionPreReleaseSeparator)))</AspNetCore30VersionMajorMinorPatchVersion>
|
||||
|
@ -34,6 +44,17 @@
|
|||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Common.ItemTemplates" PackageVersion="$(MicrosoftDotNetCommonItemTemplates31PackageVersion)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Common.ProjectTemplates.3.0" PackageVersion="$(MicrosoftDotNetCommonProjectTemplates31PackageVersion)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Test.ProjectTemplates.3.0" PackageVersion="$(MicrosoftDotNetTestProjectTemplates31PackageVersion)" />
|
||||
<Bundled31Templates Include="Microsoft.Dotnet.Wpf.ProjectTemplates" PackageVersion="$(MicrosoftDotnetWpfProjectTemplates31PackageVersion)" />
|
||||
<Bundled31Templates Include="Microsoft.Dotnet.WinForms.ProjectTemplates" PackageVersion="$(MicrosoftDotnetWinFormsProjectTemplates31PackageVersion)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Web.ItemTemplates" PackageVersion="$(AspNetCorePackageVersionFor31Templates)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Web.ProjectTemplates.3.1" PackageVersion="$(AspNetCorePackageVersionFor31Templates)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1" PackageVersion="$(AspNetCorePackageVersionFor31Templates)" />
|
||||
<Bundled31Templates Include="NUnit3.DotNetNew.Template" PackageVersion="$(NUnit3Templates31PackageVersion)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Bundled30Templates Include="Microsoft.DotNet.Common.ItemTemplates" PackageVersion="$(MicrosoftDotNetCommonItemTemplates30PackageVersion)" />
|
||||
<Bundled30Templates Include="Microsoft.DotNet.Common.ProjectTemplates.3.0" PackageVersion="$(MicrosoftDotNetCommonProjectTemplates30PackageVersion)" />
|
||||
|
@ -64,6 +85,13 @@
|
|||
<Bundled21Templates Include="NUnit3.DotNetNew.Template" PackageVersion="$(NUnit3Templates21PackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Bundled31Templates Update="@(Bundled31Templates)">
|
||||
<NupkgPathRelativeToPackageRoot>%(Identity)/%(PackageVersion)/%(Identity).%(PackageVersion).nupkg</NupkgPathRelativeToPackageRoot>
|
||||
<RestoredNupkgPath>$(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(NupkgPathRelativeToPackageRoot)', '').ToLower())</RestoredNupkgPath>
|
||||
<Version>[%(PackageVersion)]</Version>
|
||||
</Bundled31Templates>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Bundled30Templates Update="@(Bundled30Templates)">
|
||||
<NupkgPathRelativeToPackageRoot>%(Identity)/%(PackageVersion)/%(Identity).%(PackageVersion).nupkg</NupkgPathRelativeToPackageRoot>
|
||||
|
@ -87,16 +115,16 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageDownload Include="@(Bundled22Templates);@(Bundled21Templates)" />
|
||||
<PackageDownload Include="@(Bundled30Templates);@(Bundled22Templates);@(Bundled21Templates)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Restore bundled templates via PackageReference -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="@(Bundled30Templates)" />
|
||||
<PackageReference Include="@(Bundled31Templates)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="LayoutTemplates"
|
||||
DependsOnTargets="LayoutTemplatesForSDK;LayoutTemplatesFor30MSI;LayoutTemplatesFor22MSI;LayoutTemplatesFor21MSI" />
|
||||
DependsOnTargets="LayoutTemplatesForSDK;LayoutTemplatesFor31MSI;LayoutTemplatesFor30MSI;LayoutTemplatesFor22MSI;LayoutTemplatesFor21MSI" />
|
||||
|
||||
<Target Name="LayoutTemplatesForSDK"
|
||||
DependsOnTargets="SetupBundledComponents;CalculateTemplatesVersions">
|
||||
|
@ -104,8 +132,15 @@
|
|||
<BundledTemplate Remove="Microsoft.Dotnet.Wpf.ProjectTemplates" />
|
||||
<BundledTemplate Remove="Microsoft.Dotnet.WinForms.ProjectTemplates" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="%(Bundled30Templates.RestoredNupkgPath)"
|
||||
DestinationFolder="$(RedistLayoutPath)templates/$(BundledTemplates30InstallPath)"/>
|
||||
<Copy SourceFiles="%(Bundled31Templates.RestoredNupkgPath)"
|
||||
DestinationFolder="$(RedistLayoutPath)templates/$(BundledTemplates31InstallPath)"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="LayoutTemplatesFor31MSI"
|
||||
DependsOnTargets="SetupBundledComponents;CalculateTemplatesVersions"
|
||||
Condition="$(ProductMonikerRid.StartsWith('win')) And !$(Architecture.StartsWith('arm'))">
|
||||
<Copy SourceFiles="%(Bundled31Templates.RestoredNupkgPath)"
|
||||
DestinationFolder="$(Templates31LayoutPath)templates/$(BundledTemplates31InstallPath)"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="LayoutTemplatesFor30MSI"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<PropertyGroup>
|
||||
<RedistLayoutPath>$(BaseOutputPath)$(Configuration)\dotnet\</RedistLayoutPath>
|
||||
<SdkInternalLayoutPath>$(BaseOutputPath)$(Configuration)\dotnet-internal\</SdkInternalLayoutPath>
|
||||
<Templates31LayoutPath>$(BaseOutputPath)$(Configuration)\templates-3.1\</Templates31LayoutPath>
|
||||
<Templates30LayoutPath>$(BaseOutputPath)$(Configuration)\templates-3.0\</Templates30LayoutPath>
|
||||
<Templates22LayoutPath>$(BaseOutputPath)$(Configuration)\templates-2.2\</Templates22LayoutPath>
|
||||
<Templates21LayoutPath>$(BaseOutputPath)$(Configuration)\templates-2.1\</Templates21LayoutPath>
|
||||
|
|
Loading…
Reference in a new issue