From 1338f447fa88d4ed5511fa531016010d414b9257 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 26 Mar 2018 11:20:22 -0700 Subject: [PATCH] Remove test that attempted to build a ClassLibrary using precompilation Fixes #251 --- RazorViewCompilation.sln | 32 +------------ build/dependencies.props | 32 ++++++------- korebuild-lock.txt | 4 +- ...cationConsumingPrecompiledViews_CoreCLR.cs | 42 ----------------- ...cationConsumingPrecompiledViews_Desktop.cs | 45 ------------------- ...ionUsingPrecompiledViewClassLibrary.csproj | 26 ----------- .../Program.cs | 26 ----------- .../Startup.cs | 29 ------------ .../Areas/Manage/HomeController.cs | 10 ----- .../Areas/Manage/Views/Home/Index.cshtml | 9 ---- .../Areas/Manage/Views/Shared/_Layout.cshtml | 8 ---- .../ClassLibraryWithPrecompiledViews.csproj | 15 ------- .../Program.cs | 9 ---- 13 files changed, 19 insertions(+), 268 deletions(-) delete mode 100644 test/FunctionalTests/CoreCLRTests/ApplicationConsumingPrecompiledViews_CoreCLR.cs delete mode 100644 test/FunctionalTests/DesktopTests/ApplicationConsumingPrecompiledViews_Desktop.cs delete mode 100644 testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj delete mode 100644 testapps/ApplicationUsingPrecompiledViewClassLibrary/Program.cs delete mode 100644 testapps/ApplicationUsingPrecompiledViewClassLibrary/Startup.cs delete mode 100644 testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/HomeController.cs delete mode 100644 testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Home/Index.cshtml delete mode 100644 testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Shared/_Layout.cshtml delete mode 100644 testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj delete mode 100644 testapps/ClassLibraryWithPrecompiledViews/Program.cs diff --git a/RazorViewCompilation.sln b/RazorViewCompilation.sln index 1a67150f1f..3e35780944 100644 --- a/RazorViewCompilation.sln +++ b/RazorViewCompilation.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26730.10 +VisualStudioVersion = 15.0.27130.2036 MinimumVisualStudioVersion = 15.0.26730.03 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation", "src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj", "{4339FC9B-AEC6-442A-B413-A41555ED76C7}" EndProject @@ -54,10 +54,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationWithCustomInputF EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibraryTagHelper", "testapps\ClassLibraryTagHelper\ClassLibraryTagHelper.csproj", "{196EF313-71CB-47A9-A77D-AACAF62881A1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibraryWithPrecompiledViews", "testapps\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj", "{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationUsingPrecompiledViewClassLibrary", "testapps\ApplicationUsingPrecompiledViewClassLibrary\ApplicationUsingPrecompiledViewClassLibrary.csproj", "{037F4B73-75FB-4570-A38A-9109B580168C}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationWithTagHelpers", "testapps\ApplicationWithTagHelpers\ApplicationWithTagHelpers.csproj", "{08552602-37E7-48A7-95A2-BB1A1F57C804}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RazorPagesApp", "testapps\RazorPagesApp\RazorPagesApp.csproj", "{779BACC4-B20E-4F73-A9C7-350443CF1941}" @@ -229,30 +225,6 @@ Global {196EF313-71CB-47A9-A77D-AACAF62881A1}.Release|x64.Build.0 = Release|Any CPU {196EF313-71CB-47A9-A77D-AACAF62881A1}.Release|x86.ActiveCfg = Release|Any CPU {196EF313-71CB-47A9-A77D-AACAF62881A1}.Release|x86.Build.0 = Release|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|x64.ActiveCfg = Debug|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|x64.Build.0 = Debug|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|x86.ActiveCfg = Debug|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|x86.Build.0 = Debug|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|Any CPU.Build.0 = Release|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|x64.ActiveCfg = Release|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|x64.Build.0 = Release|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|x86.ActiveCfg = Release|Any CPU - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|x86.Build.0 = Release|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Debug|x64.ActiveCfg = Debug|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Debug|x64.Build.0 = Debug|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Debug|x86.ActiveCfg = Debug|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Debug|x86.Build.0 = Debug|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Release|Any CPU.Build.0 = Release|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Release|x64.ActiveCfg = Release|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Release|x64.Build.0 = Release|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Release|x86.ActiveCfg = Release|Any CPU - {037F4B73-75FB-4570-A38A-9109B580168C}.Release|x86.Build.0 = Release|Any CPU {08552602-37E7-48A7-95A2-BB1A1F57C804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {08552602-37E7-48A7-95A2-BB1A1F57C804}.Debug|Any CPU.Build.0 = Debug|Any CPU {08552602-37E7-48A7-95A2-BB1A1F57C804}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -342,8 +314,6 @@ Global {559FBB83-40BC-47AF-A224-312CF8E3629B} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} {8F73A290-BCE1-461A-9970-397FFBFCC902} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} {196EF313-71CB-47A9-A77D-AACAF62881A1} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} - {68BB859F-E5D5-407E-9DFB-8CD478EFE90D} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} - {037F4B73-75FB-4570-A38A-9109B580168C} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} {08552602-37E7-48A7-95A2-BB1A1F57C804} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} {779BACC4-B20E-4F73-A9C7-350443CF1941} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} {996D4DEB-1701-435E-8048-1E65790C2050} = {02F7AA35-91AF-491E-9F0E-03CFAF86C720} diff --git a/build/dependencies.props b/build/dependencies.props index 157f0339bd..5c84696457 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,25 +3,25 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-preview2-15744 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 0.5.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 + 2.1.0-preview2-15749 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 + 0.5.0-preview2-30436 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 15.6.82 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 - 2.1.0-preview2-30355 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 + 2.1.0-preview2-30436 2.0.0 2.1.0-preview2-26314-02 - 15.6.0 + 15.6.1 2.3.1 2.4.0-beta.1.build3945 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index f531e7b0f7..b8e036fe2c 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15744 -commithash:9e15cb6062ab5b9790d3fa699e018543a6950713 +version:2.1.0-preview2-15749 +commithash:5544c9ab20fa5e24b9e155d8958a3c3b6f5f9df9 diff --git a/test/FunctionalTests/CoreCLRTests/ApplicationConsumingPrecompiledViews_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/ApplicationConsumingPrecompiledViews_CoreCLR.cs deleted file mode 100644 index 2789080628..0000000000 --- a/test/FunctionalTests/CoreCLRTests/ApplicationConsumingPrecompiledViews_CoreCLR.cs +++ /dev/null @@ -1,42 +0,0 @@ -// 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.Threading.Tasks; -using Microsoft.Extensions.Logging.Testing; -using Xunit; -using Xunit.Abstractions; - -namespace FunctionalTests -{ - public class ApplicationConsumingPrecompiledViews_CoreCLR - : LoggedTest, IClassFixture> - { - public ApplicationConsumingPrecompiledViews_CoreCLR( - CoreCLRApplicationTestFixture fixture, - ITestOutputHelper output) - : base(output) - { - Fixture = fixture; - } - - public ApplicationTestFixture Fixture { get; } - - [Fact] - public async Task ConsumingClassLibrariesWithPrecompiledViewsWork() - { - // Arrange - using (StartLog(out var loggerFactory)) - { - var deployment = await Fixture.CreateDeploymentAsync(loggerFactory); - - // Act - var response = await deployment.HttpClient.GetStringWithRetryAsync( - "Manage/Home", - loggerFactory.CreateLogger(Fixture.ApplicationName)); - - // Assert - TestEmbeddedResource.AssertContent("ApplicationConsumingPrecompiledViews.Manage.Home.Index.txt", response); - } - } - } -} \ No newline at end of file diff --git a/test/FunctionalTests/DesktopTests/ApplicationConsumingPrecompiledViews_Desktop.cs b/test/FunctionalTests/DesktopTests/ApplicationConsumingPrecompiledViews_Desktop.cs deleted file mode 100644 index 7b9ea14bac..0000000000 --- a/test/FunctionalTests/DesktopTests/ApplicationConsumingPrecompiledViews_Desktop.cs +++ /dev/null @@ -1,45 +0,0 @@ -// 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.Threading.Tasks; -using Microsoft.AspNetCore.Testing.xunit; -using Microsoft.Extensions.Logging.Testing; -using Xunit; -using Xunit.Abstractions; - -namespace FunctionalTests -{ - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - public class ApplicationConsumingPrecompiledViews_Desktop - : LoggedTest, IClassFixture> - { - public ApplicationConsumingPrecompiledViews_Desktop( - DesktopApplicationTestFixture fixture, - ITestOutputHelper output) - : base(output) - { - Fixture = fixture; - } - - public ApplicationTestFixture Fixture { get; } - - [ConditionalFact] - public async Task ConsumingClassLibrariesWithPrecompiledViewsWork() - { - using (StartLog(out var loggerFactory)) - { - // Arrange - var deployment = await Fixture.CreateDeploymentAsync(loggerFactory); - - // Act - var response = await deployment.HttpClient.GetStringWithRetryAsync( - "Manage/Home", - loggerFactory.CreateLogger(Fixture.ApplicationName)); - - // Assert - TestEmbeddedResource.AssertContent("ApplicationConsumingPrecompiledViews.Manage.Home.Index.txt", response); - } - } - } -} \ No newline at end of file diff --git a/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj b/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj deleted file mode 100644 index 631f5900b1..0000000000 --- a/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - $(StandardTestAppTfms) - ..\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj - - - - - - - - - - - - - - - - - - - - - diff --git a/testapps/ApplicationUsingPrecompiledViewClassLibrary/Program.cs b/testapps/ApplicationUsingPrecompiledViewClassLibrary/Program.cs deleted file mode 100644 index dffe015a2d..0000000000 --- a/testapps/ApplicationUsingPrecompiledViewClassLibrary/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.IO; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace ApplicationUsingPrecompiledViewClassLibrary -{ - public class Program - { - public static void Main(string[] args) - { - var config = new ConfigurationBuilder() - .AddCommandLine(args) - .AddEnvironmentVariables(prefix: "ASPNETCORE_") - .Build(); - - var host = new WebHostBuilder() - .UseConfiguration(config) - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseStartup() - .Build(); - - host.Run(); - } - } -} diff --git a/testapps/ApplicationUsingPrecompiledViewClassLibrary/Startup.cs b/testapps/ApplicationUsingPrecompiledViewClassLibrary/Startup.cs deleted file mode 100644 index bab0147e60..0000000000 --- a/testapps/ApplicationUsingPrecompiledViewClassLibrary/Startup.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace ApplicationUsingPrecompiledViewClassLibrary -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - } - - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(); - app.UseMvc(routes => - { - routes.MapRoute(name: "areaRoute", - template: "{area:exists}/{controller=Home}/{action=Index}"); - - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - }); - } - } -} diff --git a/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/HomeController.cs b/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/HomeController.cs deleted file mode 100644 index 7bb8681f69..0000000000 --- a/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/HomeController.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace ClassLibraryWithPrecompiledViews -{ - [Area("Manage")] - public class HomeController : Controller - { - public IActionResult Index() => View(); - } -} diff --git a/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Home/Index.cshtml b/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Home/Index.cshtml deleted file mode 100644 index 51a348bbea..0000000000 --- a/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Home/Index.cshtml +++ /dev/null @@ -1,9 +0,0 @@ -@{ - Layout = "_Layout"; -} - -

Admin home page

- -@section TestSection { - Test section -} \ No newline at end of file diff --git a/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Shared/_Layout.cshtml b/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Shared/_Layout.cshtml deleted file mode 100644 index 821a366557..0000000000 --- a/testapps/ClassLibraryWithPrecompiledViews/Areas/Manage/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,8 +0,0 @@ - - - - @GetType().Assembly.FullName - @RenderBody() - @RenderSection("TestSection") - - diff --git a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj deleted file mode 100644 index 6ee003119c..0000000000 --- a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - $(StandardTestAppTfms) - obj\precompiled\$(TargetFramework) - - true - - - - - - - - diff --git a/testapps/ClassLibraryWithPrecompiledViews/Program.cs b/testapps/ClassLibraryWithPrecompiledViews/Program.cs deleted file mode 100644 index 50d50a8c81..0000000000 --- a/testapps/ClassLibraryWithPrecompiledViews/Program.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ClassLibraryWithPrecompiledViews -{ - public class Program - { - public static void Main() - { - } - } -} \ No newline at end of file