From 563ff7c63941ff44d0754de1d0cef46811217bfa Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Tue, 15 Jan 2019 15:49:13 -0800 Subject: [PATCH 1/7] Put Razor.Design.Test and Razor.Language.Test in a different test group (#6725) --- .../Microsoft.AspNetCore.Razor.Design.Test.csproj | 1 + .../test/Microsoft.AspNetCore.Razor.Language.Test.csproj | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj b/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj index b27dca6270..86bcbf5a9f 100644 --- a/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj +++ b/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj @@ -13,6 +13,7 @@ true $(MSBuildProjectDirectory)\obj\BuildVariables.generated.cs + RazorTests diff --git a/src/Razor/Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj b/src/Razor/Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj index d1946a6d9c..9c5339ed8c 100644 --- a/src/Razor/Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj +++ b/src/Razor/Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj @@ -4,6 +4,7 @@ netcoreapp2.1;net46 $(DefaultItemExcludes);TestFiles\**\* $(DefineConstants);GENERATE_BASELINES + RazorTests From 12a479d1f69c277ae409aebe1b2351f2f29ea52a Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 15 Jan 2019 17:18:28 -0800 Subject: [PATCH 2/7] Move dotnet watch to a seperate test group (#6730) --- src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj b/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj index ada6cec74c..bab30267fa 100644 --- a/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj +++ b/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj @@ -4,6 +4,7 @@ netcoreapp2.1 Microsoft.DotNet.Watcher.Tools.Tests $(DefaultItemExcludes);TestProjects\**\* + DotNetWatcherToolsTests From 99eba6972f6a10e37ee2608f74156216cf475ca9 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Tue, 15 Jan 2019 20:14:04 -0800 Subject: [PATCH 3/7] Reuse root `version.props` in Templating - do not let Templating get behind branding changes --- src/Templating/version.props | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Templating/version.props b/src/Templating/version.props index 55260ca173..39e69414a0 100644 --- a/src/Templating/version.props +++ b/src/Templating/version.props @@ -1,12 +1,3 @@ - - 2.1.7 - servicing - $(VersionPrefix) - $(VersionPrefix)-$(VersionSuffix)-final - t000 - a- - $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) - $(VersionSuffix)-$(BuildNumber) - + From 9831238b7c72ddd083b8df5d8a53ff396cef0e22 Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Wed, 16 Jan 2019 11:06:44 -0800 Subject: [PATCH 4/7] Revert "Put Razor.Design.Test and Razor.Language.Test in a different test group (#6725)" (#6753) This reverts commit 563ff7c63941ff44d0754de1d0cef46811217bfa. --- .../Microsoft.AspNetCore.Razor.Design.Test.csproj | 1 - .../test/Microsoft.AspNetCore.Razor.Language.Test.csproj | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj b/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj index 86bcbf5a9f..b27dca6270 100644 --- a/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj +++ b/src/Razor/Razor.Design/test/IntegrationTests/Microsoft.AspNetCore.Razor.Design.Test.csproj @@ -13,7 +13,6 @@ true $(MSBuildProjectDirectory)\obj\BuildVariables.generated.cs - RazorTests diff --git a/src/Razor/Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj b/src/Razor/Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj index 9c5339ed8c..d1946a6d9c 100644 --- a/src/Razor/Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj +++ b/src/Razor/Razor.Language/test/Microsoft.AspNetCore.Razor.Language.Test.csproj @@ -4,7 +4,6 @@ netcoreapp2.1;net46 $(DefaultItemExcludes);TestFiles\**\* $(DefineConstants);GENERATE_BASELINES - RazorTests From 5b56de94fd651ef7b08845ed80bcf13ca22a3947 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Wed, 16 Jan 2019 12:04:36 -0800 Subject: [PATCH 5/7] Allow disabling shared configuration check from hosting bundle. (#6498) --- .../ANCMV1/aspnetcoremodule.wxs | 3 ++- .../ANCMV2/aspnetcoremodulev2.wxs | 3 ++- .../Windows/WindowsHostingBundle/ANCM.wxs | 18 +++++++++++++----- .../Windows/WindowsHostingBundle/Bundle.wxs | 3 ++- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV1/aspnetcoremodule.wxs b/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV1/aspnetcoremodule.wxs index 709870385e..d059c77f4e 100644 --- a/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV1/aspnetcoremodule.wxs +++ b/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV1/aspnetcoremodule.wxs @@ -60,6 +60,7 @@ Microsoft Corporation + @@ -251,7 +252,7 @@ - + OPT_NO_SHARED_CONFIG_CHECK=0 AND NOT Installed AND NOT REMOVE="ALL" diff --git a/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/aspnetcoremodulev2.wxs b/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/aspnetcoremodulev2.wxs index 271652c2e6..1a330d3588 100644 --- a/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/aspnetcoremodulev2.wxs +++ b/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/aspnetcoremodulev2.wxs @@ -62,6 +62,7 @@ Microsoft Corporation + @@ -285,7 +286,7 @@ - + OPT_NO_SHARED_CONFIG_CHECK=0 AND NOT Installed AND NOT REMOVE="ALL" diff --git a/src/Installers/Windows/WindowsHostingBundle/ANCM.wxs b/src/Installers/Windows/WindowsHostingBundle/ANCM.wxs index dd47afe26c..7cf826d8af 100644 --- a/src/Installers/Windows/WindowsHostingBundle/ANCM.wxs +++ b/src/Installers/Windows/WindowsHostingBundle/ANCM.wxs @@ -1,5 +1,5 @@ - + @@ -9,28 +9,36 @@ Compressed="yes" Vital="yes" Visible="no" - InstallCondition="NOT VersionNT64 AND (VersionNT >= v6.1) AND (IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1) AND (NOT OPT_NO_ANCM)" /> + InstallCondition="NOT VersionNT64 AND (VersionNT >= v6.1) AND (IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1) AND (NOT OPT_NO_ANCM)"> + + + InstallCondition="VersionNT64 AND (VersionNT64 >= v6.1) AND (IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1) AND (NOT OPT_NO_ANCM)"> + + + InstallCondition="NOT VersionNT64 AND (VersionNT >= v6.1) AND (IISCoreWebEngineInstalled_x86=1) AND (IISW3SVCInstalled_x86=1) AND (NOT OPT_NO_ANCM)"> + + + InstallCondition="VersionNT64 AND (VersionNT64 >= v6.1) AND (IISCoreWebEngineInstalled_x64=1) AND (IISW3SVCInstalled_x64=1) AND (NOT OPT_NO_ANCM)"> + + + - From 18425ed192836b6e043b38520c9383d48cb8d3ac Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Wed, 16 Jan 2019 14:40:45 -0800 Subject: [PATCH 6/7] Merge branch release/2.1 to release/2.2 (#6754) * Put Razor.Design.Test and Razor.Language.Test in a different test group (#6725) * Move dotnet watch to a seperate test group (#6730) * Reuse root `version.props` in Templating - do not let Templating get behind branding changes * Revert "Put Razor.Design.Test and Razor.Language.Test in a different test group (#6725)" (#6753) This reverts commit 563ff7c63941ff44d0754de1d0cef46811217bfa. * Revert file watch test changes --- src/Templating/version.props | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Templating/version.props b/src/Templating/version.props index 4531e641d0..39e69414a0 100644 --- a/src/Templating/version.props +++ b/src/Templating/version.props @@ -1,12 +1,3 @@ - - 2.2.2 - servicing - $(VersionPrefix) - $(VersionPrefix)-$(VersionSuffix)-final - t000 - a- - $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) - $(VersionSuffix)-$(BuildNumber) - + From ad31f9429d8c0f8aff54c2b6b3455c1a19e46800 Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Wed, 16 Jan 2019 14:41:50 -0800 Subject: [PATCH 7/7] Fix failing Razor file comparison tests (#6757) --- .../RazorCompileIntegrationTest.cs | 21 +++--- .../test/DefaultRazorProjectFileSystemTest.cs | 70 +++++++++---------- 2 files changed, 45 insertions(+), 46 deletions(-) diff --git a/src/Razor/Razor.Design/test/IntegrationTests/IntegrationTests/RazorCompileIntegrationTest.cs b/src/Razor/Razor.Design/test/IntegrationTests/IntegrationTests/RazorCompileIntegrationTest.cs index c375b99354..77f4627fab 100644 --- a/src/Razor/Razor.Design/test/IntegrationTests/IntegrationTests/RazorCompileIntegrationTest.cs +++ b/src/Razor/Razor.Design/test/IntegrationTests/IntegrationTests/RazorCompileIntegrationTest.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.IO; using System.Linq; using System.Reflection; @@ -41,7 +42,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.BuildPassed(result); - // Everything we do should noop - including building the app. + // Everything we do should noop - including building the app. Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.dll"); Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.pdb"); Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.Views.dll"); @@ -49,7 +50,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests } [Fact] - [InitializeTestProject("SimpleMvc")] + [InitializeTestProject("SimpleMvc")] public async Task RazorCompile_EmbedRazorGenerateSources_EmbedsCshtmlFiles() { var result = await DotnetMSBuild("RazorCompile", "/p:EmbedRazorGenerateSources=true"); @@ -63,16 +64,16 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.Equal(new string[] { - "/Views/_ViewImports.cshtml", - "/Views/_ViewStart.cshtml", "/Views/Home/About.cshtml", "/Views/Home/Contact.cshtml", "/Views/Home/Index.cshtml", + "/Views/Shared/Error.cshtml", "/Views/Shared/_Layout.cshtml", "/Views/Shared/_ValidationScriptsPartial.cshtml", - "/Views/Shared/Error.cshtml", + "/Views/_ViewImports.cshtml", + "/Views/_ViewStart.cshtml", }, - resources.OrderBy(r => r)); + resources.OrderBy(r => r, StringComparer.Ordinal)); } [Fact] @@ -90,16 +91,16 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.Equal(new string[] { - "/Views/_ViewImports.cshtml", - "/Views/_ViewStart.cshtml", "/Views/Home/About.cshtml", "/Views/Home/Contact.cshtml", "/Views/Home/Index.cshtml", + "/Views/Shared/Error.cshtml", "/Views/Shared/_Layout.cshtml", "/Views/Shared/_ValidationScriptsPartial.cshtml", - "/Views/Shared/Error.cshtml", + "/Views/_ViewImports.cshtml", + "/Views/_ViewStart.cshtml", }, - resources.OrderBy(r => r)); + resources.OrderBy(r => r, StringComparer.Ordinal)); } private Assembly LoadAssemblyFromBytes(params string[] paths) diff --git a/src/Razor/Razor.Language/test/DefaultRazorProjectFileSystemTest.cs b/src/Razor/Razor.Language/test/DefaultRazorProjectFileSystemTest.cs index af48d1e900..719659a620 100644 --- a/src/Razor/Razor.Language/test/DefaultRazorProjectFileSystemTest.cs +++ b/src/Razor/Razor.Language/test/DefaultRazorProjectFileSystemTest.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.IO; using System.Linq; using Microsoft.AspNetCore.Testing; @@ -77,15 +78,7 @@ namespace Microsoft.AspNetCore.Razor.Language // Assert Assert.Collection( - items.OrderBy(f => f.FilePath), - item => - { - Assert.Equal("/_ViewImports.cshtml", item.FilePath); - Assert.Equal("/", item.BasePath); - Assert.Equal(Path.Combine(TestFolder, "_ViewImports.cshtml"), item.PhysicalPath); - Assert.Equal("_ViewImports.cshtml", item.RelativePhysicalPath); - - }, + items.OrderBy(f => f.FilePath, StringComparer.Ordinal), item => { Assert.Equal("/Home.cshtml", item.FilePath); @@ -93,14 +86,6 @@ namespace Microsoft.AspNetCore.Razor.Language Assert.Equal(Path.Combine(TestFolder, "Home.cshtml"), item.PhysicalPath); Assert.Equal("Home.cshtml", item.RelativePhysicalPath); - }, - item => - { - Assert.Equal("/Views/_ViewImports.cshtml", item.FilePath); - Assert.Equal("/", item.BasePath); - Assert.Equal(Path.Combine(TestFolder, "Views", "_ViewImports.cshtml"), item.PhysicalPath); - Assert.Equal(Path.Combine("Views", "_ViewImports.cshtml"), item.RelativePhysicalPath); - }, item => { @@ -110,19 +95,32 @@ namespace Microsoft.AspNetCore.Razor.Language Assert.Equal(Path.Combine("Views", "About", "About.cshtml"), item.RelativePhysicalPath); }, item => - { - Assert.Equal("/Views/Home/_ViewImports.cshtml", item.FilePath); - Assert.Equal("/", item.BasePath); - Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "_ViewImports.cshtml"), item.PhysicalPath); - Assert.Equal(Path.Combine("Views", "Home", "_ViewImports.cshtml"), item.RelativePhysicalPath); - - }, - item => { Assert.Equal("/Views/Home/Index.cshtml", item.FilePath); Assert.Equal("/", item.BasePath); Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "Index.cshtml"), item.PhysicalPath); Assert.Equal(Path.Combine("Views", "Home", "Index.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/Views/Home/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Views", "Home", "_ViewImports.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/Views/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Views", "_ViewImports.cshtml"), item.RelativePhysicalPath); + }, + item => + { + Assert.Equal("/_ViewImports.cshtml", item.FilePath); + Assert.Equal("/", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal("_ViewImports.cshtml", item.RelativePhysicalPath); }); } @@ -137,14 +135,7 @@ namespace Microsoft.AspNetCore.Razor.Language // Assert Assert.Collection( - items.OrderBy(f => f.FilePath), - item => - { - Assert.Equal("/_ViewImports.cshtml", item.FilePath); - Assert.Equal("/Views", item.BasePath); - Assert.Equal(Path.Combine(TestFolder, "Views", "_ViewImports.cshtml"), item.PhysicalPath); - Assert.Equal(Path.Combine("_ViewImports.cshtml"), item.RelativePhysicalPath); - }, + items.OrderBy(f => f.FilePath, StringComparer.Ordinal), item => { Assert.Equal("/About/About.cshtml", item.FilePath); @@ -153,6 +144,13 @@ namespace Microsoft.AspNetCore.Razor.Language Assert.Equal(Path.Combine("About", "About.cshtml"), item.RelativePhysicalPath); }, item => + { + Assert.Equal("/Home/Index.cshtml", item.FilePath); + Assert.Equal("/Views", item.BasePath); + Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "Index.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("Home", "Index.cshtml"), item.RelativePhysicalPath); + }, + item => { Assert.Equal("/Home/_ViewImports.cshtml", item.FilePath); Assert.Equal("/Views", item.BasePath); @@ -161,10 +159,10 @@ namespace Microsoft.AspNetCore.Razor.Language }, item => { - Assert.Equal("/Home/Index.cshtml", item.FilePath); + Assert.Equal("/_ViewImports.cshtml", item.FilePath); Assert.Equal("/Views", item.BasePath); - Assert.Equal(Path.Combine(TestFolder, "Views", "Home", "Index.cshtml"), item.PhysicalPath); - Assert.Equal(Path.Combine("Home", "Index.cshtml"), item.RelativePhysicalPath); + Assert.Equal(Path.Combine(TestFolder, "Views", "_ViewImports.cshtml"), item.PhysicalPath); + Assert.Equal(Path.Combine("_ViewImports.cshtml"), item.RelativePhysicalPath); }); }