From dbc930cc789220920bfc7ac5e15d708addee17ad Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 11 Jun 2018 09:39:52 -0700 Subject: [PATCH 1/5] ResponseCache attribute on RazorPages Error handler method should be moved to model Fixes #553 --- .../content/RazorPagesWeb-CSharp/Pages/Error.cshtml.cs | 2 +- .../content/Angular-CSharp/Pages/Error.cshtml.cs | 2 +- .../content/React-CSharp/Pages/Error.cshtml.cs | 2 +- .../content/ReactRedux-CSharp/Pages/Error.cshtml.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Error.cshtml.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Error.cshtml.cs index d3ef08b414..9cb1d63663 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Error.cshtml.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Error.cshtml.cs @@ -8,13 +8,13 @@ using Microsoft.AspNetCore.Mvc.RazorPages; namespace Company.WebApplication1.Pages { + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public class ErrorModel : PageModel { public string RequestId { get; set; } public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Pages/Error.cshtml.cs b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Pages/Error.cshtml.cs index d3ef08b414..9cb1d63663 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Pages/Error.cshtml.cs +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Pages/Error.cshtml.cs @@ -8,13 +8,13 @@ using Microsoft.AspNetCore.Mvc.RazorPages; namespace Company.WebApplication1.Pages { + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public class ErrorModel : PageModel { public string RequestId { get; set; } public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Pages/Error.cshtml.cs b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Pages/Error.cshtml.cs index d3ef08b414..9cb1d63663 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Pages/Error.cshtml.cs +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Pages/Error.cshtml.cs @@ -8,13 +8,13 @@ using Microsoft.AspNetCore.Mvc.RazorPages; namespace Company.WebApplication1.Pages { + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public class ErrorModel : PageModel { public string RequestId { get; set; } public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; diff --git a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Pages/Error.cshtml.cs b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Pages/Error.cshtml.cs index d3ef08b414..9cb1d63663 100644 --- a/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Pages/Error.cshtml.cs +++ b/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Pages/Error.cshtml.cs @@ -8,13 +8,13 @@ using Microsoft.AspNetCore.Mvc.RazorPages; namespace Company.WebApplication1.Pages { + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public class ErrorModel : PageModel { public string RequestId { get; set; } public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; From 62bf802971aa72441e6dad86b0d020f5b95b167c Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 11 Jul 2018 18:50:12 -0700 Subject: [PATCH 2/5] Updating dependencies to 2.1.2 and adding a section for pinned variable versions --- build/dependencies.props | 67 ++++++++++++++++++++++------------------ korebuild-lock.txt | 4 +-- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index e10dc7aa73..15b880852e 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -2,41 +2,43 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - + + + 0.9.9 - 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.1 + 2.1.3-rtm-15802 + 2.1.2 + 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 + 2.1.2 + 2.1.1 + 2.1.1 + 2.1.2 + 2.1.1 + 2.1.1 + 2.1.1 2.1.0 15.6.82 15.6.82 - 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.2-rtm-30874 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.1 + 2.1.2 + 2.1.1 15.6.1 - 2.1.2-rtm-30874 - 2.1.2-rtm-30874 + 2.1.1 + 2.1.1 2.0.3 0.20.0 3.12.1 @@ -47,5 +49,10 @@ 2.3.1 2.4.0-beta.1.build3945 + + + + + diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 0b6f12f1ec..1dfc352a0a 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.3-rtm-15796 -commithash:bb5fcc49ee843d3be2ebd4cc879658db55fc79da +version:2.1.3-rtm-15802 +commithash:a7c08b45b440a7d2058a0aa1eaa3eb6ba811976a From 201a35e095d00c085bb5b16d39d41e9f68ec08c6 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 12 Jul 2018 11:59:25 -0700 Subject: [PATCH 3/5] Pin version variables to the ASP.NET Core 2.1.2 baseline This reverts our previous policy of cascading versions on all servicing updates. This moves variables into the 'pinned' section, and points them to the latest stable release (versions that were used at the time of the 2.1.2 release). --- build/dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/dependencies.props b/build/dependencies.props index 15b880852e..fbcb1738ae 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,7 +4,7 @@ - + 0.9.9 2.1.1 2.1.3-rtm-15802 From 81d6aa0d6b3c977059dc78d760291ea94ecfd8b3 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 18 Jul 2018 13:09:58 -0700 Subject: [PATCH 4/5] Delete .travis.yml --- .travis.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 41d3fd2653..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: csharp -sudo: required -dist: trusty -env: - global: - - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - - TRAVIS_NODE_VERSION: 8.9.3 -addons: - apt: - packages: - - libunwind8 -mono: none -os: -- linux -- osx -osx_image: xcode9.2 -branches: - only: - - dev - - /^release\/.*$/ - - /^(.*\/)?ci-.*$/ -before_install: -- nvm install $TRAVIS_NODE_VERSION -- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s - /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib - /usr/local/lib/; fi -script: -- ./build.sh From 55b697ab057cfe76b2f7c13c25a24a056c317ad2 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 18 Jul 2018 12:47:48 -0700 Subject: [PATCH 5/5] Revert "Add package version to Microsoft.AspNetCore.App in project templates" This reverts commit 727bd52b64a022fda0db882fb74bf2d434a17ea4. --- build/dependencies.props | 35 ++++++++++--------- .../EmptyWeb-CSharp.csproj.in | 2 +- .../EmptyWeb-FSharp.fsproj.in | 2 +- ...crosoft.DotNet.Web.ProjectTemplates.csproj | 1 - .../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 | 1 - .../React-CSharp.csproj.in | 2 +- .../ReactRedux-CSharp.csproj.in | 2 +- test/GenerateTestProps.targets | 12 +++++-- test/TemplateTests.props.in | 4 +++ 15 files changed, 41 insertions(+), 32 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index fbcb1738ae..98d48d83db 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -6,39 +6,40 @@ 0.9.9 - 2.1.1 + 2.1.2-rtm-30913 2.1.3-rtm-15802 - 2.1.2 + 2.1.3-rtm-30913 + 2.1.3-rtm-30913 2.1.1 2.1.1 - 2.1.1 - 2.1.1 - 2.1.1 + 2.1.2-rtm-30913 + 2.1.2-rtm-30913 + 2.1.2-rtm-30913 2.1.1 - 2.1.1 + 2.1.2-rtm-30913 2.1.1 2.1.1 - 2.1.2 - 2.1.2 - 2.1.1 + 2.1.3-rtm-30913 + 2.1.3-rtm-30913 + 2.1.2-rtm-30913 2.1.1 - 2.1.2 + 2.1.3-rtm-30913 2.1.1 2.1.1 2.1.1 2.1.0 15.6.82 15.6.82 - 2.1.1 - 2.1.1 - 2.1.1 + 2.1.2-rtm-30913 + 2.1.2-rtm-30913 + 2.1.2-rtm-30913 2.1.1 2.1.1 - 2.1.2 - 2.1.1 + 2.1.3-servicing-26708-02 + 2.1.2-rtm-30913 15.6.1 2.1.1 - 2.1.1 + 2.1.3-rtm-30913 2.0.3 0.20.0 3.12.1 @@ -47,7 +48,7 @@ 4.5.0 0.8.0 2.3.1 - 2.4.0-beta.1.build3945 + 2.4.0-rc.1.build4038 diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in b/src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in index dfcd611198..0db9c70633 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 d5b6962b3b..5e029bbfd5 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 fa1f9baf9a..1e3b76e3e8 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,6 @@ - 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 69b9fbdd55..4716d05f5b 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 c8da4a7f07..2e90989e97 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 2e3f0a2e01..43aa9c21f6 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 9f2e2e8560..b57b346386 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 2bce6ca368..9a435ae260 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 c88c096919..020f592ccd 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 b3a92fb83c..8b2745c15a 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,6 @@ - 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 12226d65e3..24e96c27a4 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 499317d850..82ec5a5dd2 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 9b79c9ca02..c4eaba5740 100644 --- a/test/GenerateTestProps.targets +++ b/test/GenerateTestProps.targets @@ -1,9 +1,15 @@ - RestoreSources=$([MSBuild]::Escape($(RestoreSources))) - $(PropsProperties);RuntimeFrameworkVersion=$(RuntimeFrameworkVersion) - $(PropsProperties);MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion) + + RestoreSources=$([MSBuild]::Escape($(RestoreSources))); + RuntimeFrameworkVersion=$(RuntimeFrameworkVersion); + MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion); + BundledAspNetCoreAllTargetFrameworkVersion=$(MicrosoftAspNetCoreAllPackageVersion.Split('.')[0]).$(MicrosoftAspNetCoreAllPackageVersion.Split('.')[1]); + BundledAspNetCoreAllPackageVersion=$(MicrosoftAspNetCoreAllPackageVersion); + BundledAspNetCoreAppTargetFrameworkVersion=$(MicrosoftAspNetCoreAppPackageVersion.Split('.')[0]).$(MicrosoftAspNetCoreAppPackageVersion.Split('.')[1]); + BundledAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion) + ${RestoreSources} ${RuntimeFrameworkVersion} ${MicrosoftNETSdkRazorPackageVersion} + ${BundledAspNetCoreAllTargetFrameworkVersion} + ${BundledAspNetCoreAllPackageVersion} + ${BundledAspNetCoreAppTargetFrameworkVersion} + ${BundledAspNetCoreAppPackageVersion}