From 727bd52b64a022fda0db882fb74bf2d434a17ea4 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 3 Jul 2018 16:53:46 -0700 Subject: [PATCH] Add package version to Microsoft.AspNetCore.App in project templates As discussed in aspnet/Home#3292, we're reversing course on the implicit package version feature. This adds a package version for Microsoft.AspNetCore.App to the `dotnet new` and VS templates. --- .gitignore | 1 + Directory.Build.targets | 3 +- build/dependencies.props | 58 ++++--- build/repo.props | 2 +- korebuild-lock.txt | 4 +- .../EmptyWeb-CSharp.csproj.in | 2 +- .../EmptyWeb-FSharp.fsproj.in | 2 +- ...crosoft.DotNet.Web.ProjectTemplates.csproj | 2 +- .../RazorPagesWeb-CSharp.csproj.in | 2 +- .../StarterWeb-CSharp.csproj.in | 2 +- .../StarterWeb-FSharp.fsproj.in | 2 +- .../WebApi-CSharp.csproj.in | 2 +- .../WebApi-FSharp.fsproj.in | 2 +- .../Angular-CSharp.csproj.in | 2 +- ...oft.DotNet.Web.Spa.ProjectTemplates.csproj | 2 +- .../React-CSharp.csproj.in | 2 +- .../ReactRedux-CSharp.csproj.in | 2 +- test/GenerateTestProps.targets | 19 --- test/TemplateTests.props.in | 2 - test/TemplateTests.targets.in | 154 ------------------ .../Helpers/TemplateTestBase.cs | 7 +- 21 files changed, 46 insertions(+), 228 deletions(-) delete mode 100644 test/TemplateTests.targets.in diff --git a/.gitignore b/.gitignore index 08399cc..6f6c10c 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ node_modules .vscode global.json .idea/ +*.binlog diff --git a/Directory.Build.targets b/Directory.Build.targets index 87df986..eb03b25 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,7 +1,6 @@  - $(MicrosoftNETCoreApp20PackageVersion) $(MicrosoftNETCoreApp21PackageVersion) $(NETStandardLibrary20PackageVersion) - \ No newline at end of file + diff --git a/build/dependencies.props b/build/dependencies.props index d771407..e10dc7a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,41 +4,39 @@ 0.9.9 - 2.1.1 - 2.1.1-rtm-15793 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 + 2.1.2-rtm-30874 + 2.1.3-rtm-15796 + 2.1.3-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.3-rtm-30874 + 2.1.3-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.3-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 2.1.0 15.6.82 15.6.82 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 - 2.0.0 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 2.1.1 - 2.1.1 + 2.1.2-rtm-30874 15.6.1 - 2.1.1 - 2.1.1 + 2.1.2-rtm-30874 + 2.1.2-rtm-30874 2.0.3 0.20.0 3.12.1 diff --git a/build/repo.props b/build/repo.props index a9dc2eb..8bc3037 100644 --- a/build/repo.props +++ b/build/repo.props @@ -12,7 +12,7 @@ - diff --git a/korebuild-lock.txt b/korebuild-lock.txt index d2f4947..0b6f12f 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.1-rtm-15793 -commithash:988313f4b064d6c69fc6f7b845b6384a6af3447a +version:2.1.3-rtm-15796 +commithash:bb5fcc49ee843d3be2ebd4cc879658db55fc79da diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in b/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in index 0db9c70..dfcd611 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in @@ -10,7 +10,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-FSharp.fsproj.in b/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-FSharp.fsproj.in index 5e029bb..d5b6962 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-FSharp.fsproj.in +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-FSharp.fsproj.in @@ -11,7 +11,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj b/src/Microsoft.DotNet.Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj index bb2d8de..fa1f9ba 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj @@ -13,7 +13,7 @@ - MicrosoftAspNetCoreAllPackageVersion=$(MicrosoftAspNetCoreAllPackageVersion); + MicrosoftAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion); MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion=$(MicrosoftAspNetCoreAuthenticationAzureADB2CUIPackageVersion); MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion=$(MicrosoftAspNetCoreAuthenticationAzureADUIPackageVersion); MicrosoftAspNetCoreAuthenticationCookiesPackageVersion=$(MicrosoftAspNetCoreAuthenticationCookiesPackageVersion); diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in b/src/Microsoft.DotNet.Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in index 4716d05..69b9fbd 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in @@ -16,7 +16,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/StarterWeb-CSharp.csproj.in b/src/Microsoft.DotNet.Web.ProjectTemplates/StarterWeb-CSharp.csproj.in index 2e90989..c8da4a7 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/StarterWeb-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/StarterWeb-CSharp.csproj.in @@ -16,7 +16,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in b/src/Microsoft.DotNet.Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in index 43aa9c2..2e3f0a2 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in @@ -14,7 +14,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-CSharp.csproj.in b/src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-CSharp.csproj.in index b57b346..9f2e2e8 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-CSharp.csproj.in @@ -13,7 +13,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-FSharp.fsproj.in b/src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-FSharp.fsproj.in index 9a435ae..2bce6ca 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-FSharp.fsproj.in +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-FSharp.fsproj.in @@ -12,7 +12,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in index 020f592..c88c096 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in @@ -14,7 +14,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj index 5cb599a..b3a92fb 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj @@ -13,7 +13,7 @@ - MicrosoftAspNetCoreAllPackageVersion=$(MicrosoftAspNetCoreAllPackageVersion); + MicrosoftAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion); MicrosoftAspNetCorePackageVersion=$(MicrosoftAspNetCorePackageVersion); MicrosoftAspNetCoreHttpsPolicyPackageVersion=$(MicrosoftAspNetCoreHttpsPolicyPackageVersion); MicrosoftAspNetCoreMvcPackageVersion=$(MicrosoftAspNetCoreMvcPackageVersion); diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/React-CSharp.csproj.in b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/React-CSharp.csproj.in index 24e96c2..12226d6 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/React-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/React-CSharp.csproj.in @@ -11,7 +11,7 @@ - + diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in index 82ec5a5..499317d 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in @@ -11,7 +11,7 @@ - + diff --git a/test/GenerateTestProps.targets b/test/GenerateTestProps.targets index 3287988..9b79c9c 100644 --- a/test/GenerateTestProps.targets +++ b/test/GenerateTestProps.targets @@ -4,30 +4,11 @@ RestoreSources=$([MSBuild]::Escape($(RestoreSources))) $(PropsProperties);RuntimeFrameworkVersion=$(RuntimeFrameworkVersion) $(PropsProperties);MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion) - - - 2.1.1 - $(MicrosoftAspNetCoreAllPackageVersion) - $(DefaultPatchVersionForAspNetCoreAll2_1) - $(MicrosoftAspNetCoreAppPackageVersion) - - $(PropsProperties);DefaultPatchVersionForAspNetCoreAll2_1=$(DefaultPatchVersionForAspNetCoreAll2_1) - $(PropsProperties);DefaultPatchVersionForAspNetCoreApp2_1=$(DefaultPatchVersionForAspNetCoreApp2_1) - - - BundledAspNetCoreAllTargetFrameworkVersion=$(MicrosoftAspNetCoreAllPackageVersion.Split('.')[0]).$(MicrosoftAspNetCoreAllPackageVersion.Split('.')[1]) - $(TargetsProperties);BundledAspNetCoreAllPackageVersion=$(MicrosoftAspNetCoreAllPackageVersion) - $(TargetsProperties);BundledAspNetCoreAppTargetFrameworkVersion=$(MicrosoftAspNetCoreAppPackageVersion.Split('.')[0]).$(MicrosoftAspNetCoreAppPackageVersion.Split('.')[1]) - $(TargetsProperties);BundledAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion) - diff --git a/test/TemplateTests.props.in b/test/TemplateTests.props.in index cd7240a..beb6073 100644 --- a/test/TemplateTests.props.in +++ b/test/TemplateTests.props.in @@ -4,7 +4,5 @@ ${RestoreSources} ${RuntimeFrameworkVersion} ${MicrosoftNETSdkRazorPackageVersion} - ${DefaultPatchVersionForAspNetCoreAll2_1} - ${DefaultPatchVersionForAspNetCoreApp2_1} diff --git a/test/TemplateTests.targets.in b/test/TemplateTests.targets.in deleted file mode 100644 index 5d7e98d..0000000 --- a/test/TemplateTests.targets.in +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - 2.1.1 - 2.1.1 - - - - - $(DefaultPatchVersionForAspNetCoreAll2_1) - - - ${BundledAspNetCoreAllPackageVersion} - - $(_TargetFrameworkVersionWithoutV) - - - - - $(DefaultPatchVersionForAspNetCoreApp2_1) - - - ${BundledAspNetCoreAppPackageVersion} - - $(_TargetFrameworkVersionWithoutV) - - - - - - - - - ${BundledAspNetCoreAllPackageVersion} - - $(_TargetFrameworkVersionWithoutV) - - - - - - - - - ${BundledAspNetCoreAppPackageVersion} - - $(_TargetFrameworkVersionWithoutV) - - - - - false - true - $(TargetLatestRuntimePatch) - - - - - $(DefaultAspNetCoreAllPatchVersion) - $(LatestAspNetCoreAllPatchVersion) - - - - - $(DefaultAspNetCoreAppPatchVersion) - $(LatestAspNetCoreAppPatchVersion) - - - - <_AspNetCoreAllPackageName>Microsoft.AspNetCore.All - <_AspNetCoreAppPackageName>Microsoft.AspNetCore.App - - - - - <_AspNetCoreAllReference Include="@(PackageReference->WithMetadataValue('Identity', '$(_AspNetCoreAllPackageName)'))" /> - <_ExplicitAspNetCoreAllReference Include="@(_AspNetCoreAllReference->HasMetadata('Version'))" /> - <_AspNetCoreAppReference Include="@(PackageReference->WithMetadataValue('Identity', '$(_AspNetCoreAppPackageName)'))" /> - <_ExplicitAspNetCoreAppReference Include="@(_AspNetCoreAppReference->HasMetadata('Version'))" /> - - - - $(AspNetCoreAllRuntimeFrameworkVersion) - true - All - true - - - $(AspNetCoreAppRuntimeFrameworkVersion) - true - All - true - - - - - - - - - - diff --git a/test/Templates.Test/Helpers/TemplateTestBase.cs b/test/Templates.Test/Helpers/TemplateTestBase.cs index f698c11..577e900 100644 --- a/test/Templates.Test/Helpers/TemplateTestBase.cs +++ b/test/Templates.Test/Helpers/TemplateTestBase.cs @@ -42,7 +42,6 @@ namespace Templates.Test // Directory.Build.props/targets context var templatesTestsPropsFilePath = Path.Combine(basePath, "TemplateTests.props"); - var templatesTestsTargetsFilePath = Path.Combine(basePath, "TemplateTests.targets"); var directoryBuildPropsContent = $@" @@ -50,11 +49,7 @@ $@" "; File.WriteAllText(Path.Combine(TemplateOutputDir, "Directory.Build.props"), directoryBuildPropsContent); - var directoryBuildTargetsContent = -$@" - -"; - File.WriteAllText(Path.Combine(TemplateOutputDir, "Directory.Build.targets"), directoryBuildTargetsContent); + File.WriteAllText(Path.Combine(TemplateOutputDir, "Directory.Build.targets"), ""); } protected void RunDotNetNew(string templateName, string targetFrameworkOverride, string auth = null, string language = null, bool useLocalDB = false, bool noHttps = false)