From 1026198b9bc2e22c46af807021c249ca163a0c95 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 21 Feb 2017 10:23:49 -0800 Subject: [PATCH] Remove net451 targets --- NuGetPackageVerifier.json | 14 ---- RazorViewCompilation.sln | 7 -- makefile.shade | 49 ------------- ...spNetCore.Mvc.Razor.ViewCompilation.csproj | 9 +-- ...pNetCore.Mvc.Razor.ViewCompilation.targets | 47 ------------- ...pNetCore.Mvc.Razor.ViewCompilation.targets | 2 +- ...pNetCore.Mvc.Razor.ViewCompilation.targets | 18 ----- .../ApplicationConsumingPrecompiledViews.cs | 12 +--- .../ApplicationUsingRelativePathsTest.cs | 16 ++--- .../ApplicationWithConfigureMvcTest.cs | 19 ++---- .../ApplicationWithCustomInputFilesTest.cs | 24 +++---- .../ApplicationWithParseErrorsTest.cs | 14 ++-- .../ApplicationWithTagHelpersTest.cs | 14 ++-- .../Infrastructure/ApplicationTestFixture.cs | 24 ++++--- .../Infrastructure/RuntimeFlavors.cs | 39 ----------- .../Infrastructure/TestEmbeddedResource.cs | 1 - .../PublishWithEmbedViewSourcesTest.cs | 11 +-- .../SimpleAppDesktopOnly.Home.Index.txt | 59 ---------------- .../SimpleAppMvc11Test.Home.Index.txt | 3 - .../SimpleAppX86DesktopOnly.Home.Index.txt | 1 - .../SimpleAppDesktopOnlyTest.cs | 48 ------------- .../SimpleAppTest.cs | 9 +-- .../SimpleAppWithAssemblyRenameTest.cs | 21 +++--- .../SimpleAppX86DesktopOnlyTest.cs | 48 ------------- .../StrongNamedAppTest.cs | 12 +--- .../ViewCompilationOptionsTest.cs | 18 ++--- ...ionUsingPrecompiledViewClassLibrary.csproj | 4 +- .../ApplicationUsingRelativePaths.csproj | 4 +- .../ApplicationWithConfigureMvc.csproj | 4 +- .../ApplicationWithCustomInputFiles.csproj | 4 +- .../ApplicationWithParseErrors.csproj | 4 +- .../ApplicationWithTagHelpers.csproj | 6 +- .../Controllers/HomeController.cs | 2 - .../Views/Home/NuGetPackageTagHelper.cshtml | 12 ---- .../ClassLibraryTagHelper.csproj | 2 +- .../ClassLibraryWithPrecompiledViews.csproj | 4 +- .../PublishWithEmbedViewSources.csproj | 4 +- testapps/SimpleApp/SimpleApp.csproj | 4 +- .../Controllers/HomeController.cs | 9 --- testapps/SimpleAppDesktopOnly/Program.cs | 26 ------- .../SimpleAppDesktopOnly.csproj | 21 ------ testapps/SimpleAppDesktopOnly/Startup.cs | 26 ------- .../Views/Home/Index.cshtml | 5 -- .../Views/Shared/_Layout.cshtml | 68 ------------------- .../Views/_ViewImports.cshtml | 2 - .../Views/_ViewStart.cshtml | 3 - .../SimpleAppWithAssemblyRename.csproj | 4 +- .../Controllers/HomeController.cs | 9 --- testapps/SimpleAppX86DesktopOnly/Program.cs | 26 ------- .../SimpleAppX86DesktopOnly.csproj | 21 ------ testapps/SimpleAppX86DesktopOnly/Startup.cs | 26 ------- .../Views/Home/Index.cshtml | 1 - testapps/StrongNamedApp/StrongNamedApp.csproj | 4 +- testapps/TestApps.sln | 6 -- ...tCore.Mvc.Razor.ViewCompilation-x86.csproj | 20 ------ 55 files changed, 88 insertions(+), 782 deletions(-) delete mode 100644 makefile.shade delete mode 100644 src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net451/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets delete mode 100644 src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/buildMultiTargeting/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets delete mode 100644 test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/RuntimeFlavors.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppDesktopOnly.Home.Index.txt delete mode 100644 test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppMvc11Test.Home.Index.txt delete mode 100644 test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppX86DesktopOnly.Home.Index.txt delete mode 100644 test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppDesktopOnlyTest.cs delete mode 100644 test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppX86DesktopOnlyTest.cs delete mode 100644 testapps/ApplicationWithTagHelpers/Views/Home/NuGetPackageTagHelper.cshtml delete mode 100644 testapps/SimpleAppDesktopOnly/Controllers/HomeController.cs delete mode 100644 testapps/SimpleAppDesktopOnly/Program.cs delete mode 100644 testapps/SimpleAppDesktopOnly/SimpleAppDesktopOnly.csproj delete mode 100644 testapps/SimpleAppDesktopOnly/Startup.cs delete mode 100644 testapps/SimpleAppDesktopOnly/Views/Home/Index.cshtml delete mode 100644 testapps/SimpleAppDesktopOnly/Views/Shared/_Layout.cshtml delete mode 100644 testapps/SimpleAppDesktopOnly/Views/_ViewImports.cshtml delete mode 100644 testapps/SimpleAppDesktopOnly/Views/_ViewStart.cshtml delete mode 100644 testapps/SimpleAppX86DesktopOnly/Controllers/HomeController.cs delete mode 100644 testapps/SimpleAppX86DesktopOnly/Program.cs delete mode 100644 testapps/SimpleAppX86DesktopOnly/SimpleAppX86DesktopOnly.csproj delete mode 100644 testapps/SimpleAppX86DesktopOnly/Startup.cs delete mode 100644 testapps/SimpleAppX86DesktopOnly/Views/Home/Index.cshtml delete mode 100644 tools/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.csproj diff --git a/NuGetPackageVerifier.json b/NuGetPackageVerifier.json index 9835bcd0c8..b153ab1515 100644 --- a/NuGetPackageVerifier.json +++ b/NuGetPackageVerifier.json @@ -1,18 +1,4 @@ { - "adx": { - "rules": [ - "DefaultCompositeRule" - ], - "packages": { - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation": { - "exclusions": { - "DOC_MISSING": { - "lib/netcoreapp1.1/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll": "Not a class library. Docs not required for CLI tools" - } - } - } - } - }, "Default": { "rules": [ "DefaultCompositeRule" diff --git a/RazorViewCompilation.sln b/RazorViewCompilation.sln index 9ac18e133e..334dab0c09 100644 --- a/RazorViewCompilation.sln +++ b/RazorViewCompilation.sln @@ -23,8 +23,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{87FEE984 build\common.props = build\common.props EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86", "tools\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.csproj", "{9F47A520-7DAB-409D-81C8-AD351562A1A5}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,10 +41,6 @@ Global {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Debug|Any CPU.Build.0 = Debug|Any CPU {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|Any CPU.ActiveCfg = Release|Any CPU {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|Any CPU.Build.0 = Release|Any CPU - {9F47A520-7DAB-409D-81C8-AD351562A1A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F47A520-7DAB-409D-81C8-AD351562A1A5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F47A520-7DAB-409D-81C8-AD351562A1A5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F47A520-7DAB-409D-81C8-AD351562A1A5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -55,6 +49,5 @@ Global {4339FC9B-AEC6-442A-B413-A41555ED76C7} = {02F7AA35-91AF-491E-9F0E-03CFAF86C720} {46C9A4B2-8B1C-451B-B670-C194901D66AC} = {0398AFFF-505E-4283-89DA-BBD9D28B53DB} {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F} = {0398AFFF-505E-4283-89DA-BBD9D28B53DB} - {9F47A520-7DAB-409D-81C8-AD351562A1A5} = {02F7AA35-91AF-491E-9F0E-03CFAF86C720} EndGlobalSection EndGlobal diff --git a/makefile.shade b/makefile.shade deleted file mode 100644 index 41bc61d4f3..0000000000 --- a/makefile.shade +++ /dev/null @@ -1,49 +0,0 @@ -use assembly="System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" -use assembly="System.IO.Compression.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" - -use namespace="System.IO" -use namespace="System.IO.Compression" -use namespace="System.Linq" - -use-standard-lifecycle -k-standard-goals - -#repack-x86 target='compile' if='Directory.Exists("src") && !IsLinux' - @{ - var buildDir= Path.Combine(Directory.GetCurrentDirectory(), "artifacts", "build"); - var projectName = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation"; - var projectNupkg = Files - .Include(Path.Combine(buildDir, projectName + "*.nupkg")) - .Where(path => !path.EndsWith(".symbols.nupkg", StringComparison.OrdinalIgnoreCase)) - .OrderByDescending(f => f) // On local builds multiple nupkgs are generated. - .First(); - - Log.Info("Repacking Nupkg: " + projectNupkg); - - using (var zipArchive = ZipFile.Open(projectNupkg, ZipArchiveMode.Update)) - { - MoveEntry(zipArchive, "lib/net451/" + projectName + ".exe", "runtimes/win7-x64/lib/net451/" + projectName + ".exe"); - MoveEntry(zipArchive, "lib/net451/" + projectName + "-x86.exe", "runtimes/win7-x86/lib/net451/" + projectName + "-x86.exe"); - zipArchive.CreateEntry("lib/net451/_._"); - } - } - -functions @{ - private static void MoveEntry(ZipArchive archive, string oldPath, string newPath) - { - var oldEntry = archive.GetEntry(oldPath); - if (oldEntry == null) - { - throw new Exception(oldPath + " was not found in package."); - } - - var newEntry = archive.CreateEntry(newPath); - using (var newStream = newEntry.Open()) - using (var oldStream = oldEntry.Open()) - { - oldStream.CopyTo(newStream); - } - - oldEntry.Delete(); - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj index 0412dedd36..7e07033b0a 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj @@ -2,22 +2,19 @@ Build-time references required to enable Razor view compilation as part of building the application. - netcoreapp1.1;net451 - win7-x64 + netcoreapp1.1 cshtml;razor;compilation;precompilation;aspnetcore true exe - ..\..\tools\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86\ + + build - - - diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net451/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net451/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets deleted file mode 100644 index 66a5c2b663..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net451/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets +++ /dev/null @@ -1,47 +0,0 @@ - - - - $(OutputPath)$(MSBuildThisFileName)-x86.exe - $(OutputPath)$(MSBuildThisFileName).exe - - - - - - - - - $(OutputPath)$(MSBuildThisFileName)-x86.exe.config - - - - - - $(OutputPath)$(MSBuildThisFileName).exe.config - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp1.1/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp1.1/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets index b00f3e1fb4..a64c41b277 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp1.1/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp1.1/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets @@ -14,7 +14,7 @@ --runtimeconfig "$(ProjectRuntimeConfigFilePath)" $(ExecArgs) --depsfile "$(ProjectDepsFilePath)" - $(ExecArgs) "$(MSBuildThisFileDirectory)../../lib/netcoreapp1.1/$(MSBuildThisFileName).dll" + $(ExecArgs) "$(MSBuildThisFileDirectory)$(MSBuildThisFileName).dll" $(ExecArgs) @"$(_MvcRazorResponseFilePath)" diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/buildMultiTargeting/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/buildMultiTargeting/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets deleted file mode 100644 index 0521e16543..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/buildMultiTargeting/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationConsumingPrecompiledViews.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationConsumingPrecompiledViews.cs index ec882b50f8..296e1d8843 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationConsumingPrecompiledViews.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationConsumingPrecompiledViews.cs @@ -2,13 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Collections.Generic; using System.IO; using System.Linq; -using System.Runtime.InteropServices; using System.Threading.Tasks; using System.Xml.Linq; -using Microsoft.AspNetCore.Server.IntegrationTesting; using Microsoft.AspNetCore.Testing.xunit; using Microsoft.DotNet.Cli.Utils; using Xunit; @@ -25,18 +22,15 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public ApplicationTestFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [ConditionalTheory] + [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux, SkipReason = "https://github.com/NuGet/Home/issues/4243, https://github.com/NuGet/Home/issues/4240")] [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "https://github.com/NuGet/Home/issues/4243, https://github.com/NuGet/Home/issues/4240")] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task ConsumingClassLibrariesWithPrecompiledViewsWork(RuntimeFlavor flavor) + public async Task ConsumingClassLibrariesWithPrecompiledViewsWork() { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationUsingRelativePathsTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationUsingRelativePathsTest.cs index 0f09ecb982..ce7a04b015 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationUsingRelativePathsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationUsingRelativePathsTest.cs @@ -17,14 +17,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public ApplicationTestFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task Precompilation_WorksForViewsUsingRelativePath(RuntimeFlavor flavor) + [Fact] + public async Task Precompilation_WorksForViewsUsingRelativePath() { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); @@ -38,12 +35,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation } } - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task Precompilation_WorksForViewsUsingDirectoryTraversal(RuntimeFlavor flavor) + [Fact] + public async Task Precompilation_WorksForViewsUsingDirectoryTraversal() { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithConfigureMvcTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithConfigureMvcTest.cs index d4e80d6b8b..d2e25d4538 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithConfigureMvcTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithConfigureMvcTest.cs @@ -1,10 +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.Collections.Generic; -using System.Linq; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.IntegrationTesting; using Xunit; namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation @@ -19,14 +16,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public ApplicationTestFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task Precompilation_RunsConfiguredCompilationCallbacks(RuntimeFlavor flavor) + [Fact] + public async Task Precompilation_RunsConfiguredCompilationCallbacks() { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); @@ -40,12 +34,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation } } - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task Precompilation_UsesConfiguredParseOptions(RuntimeFlavor flavor) + [Fact] + public async Task Precompilation_UsesConfiguredParseOptions() { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithCustomInputFilesTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithCustomInputFilesTest.cs index 8860803e65..c0eac2a314 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithCustomInputFilesTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithCustomInputFilesTest.cs @@ -1,7 +1,6 @@ // 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 Microsoft.AspNetCore.Server.IntegrationTesting; using System; using System.IO; using System.Linq; @@ -22,14 +21,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests public ApplicationTestFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task ApplicationWithCustomInputFiles_Works(RuntimeFlavor flavor) + [Fact] + public async Task ApplicationWithCustomInputFiles_Works() { var expectedText = "Hello Index!"; - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { // Arrange var deploymentResult = deployer.Deploy(); @@ -44,9 +40,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests } } - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task MvcRazorFilesToCompile_OverridesTheFilesToBeCompiled(RuntimeFlavor flavor) + [Fact] + public async Task MvcRazorFilesToCompile_OverridesTheFilesToBeCompiled() { // Arrange var expectedViews = new[] @@ -55,7 +50,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests "/Views/Home/Index.cshtml", }; - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); @@ -71,9 +66,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests } } - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public void MvcRazorFilesToCompile_SpecificallyDoesNotPublishFilesToBeCompiled(RuntimeFlavor flavor) + [Fact] + public void MvcRazorFilesToCompile_SpecificallyDoesNotPublishFilesToBeCompiled() { // Arrange var viewsNotPublished = new[] @@ -87,7 +81,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests "NotIncluded.cshtml", }; - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); var viewsDirectory = Path.Combine(deploymentResult.ContentRoot, "Views", "Home"); diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithParseErrorsTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithParseErrorsTest.cs index bca6533535..28b8b48c8a 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithParseErrorsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithParseErrorsTest.cs @@ -20,11 +20,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public ApplicationWithParseErrorsFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public void PublishingPrintsParseErrors(RuntimeFlavor flavor) + [Fact] + public void PublishingPrintsParseErrors() { var indexPath = Path.Combine(Fixture.ApplicationPath, "Views", "Home", "Index.cshtml"); var viewImportsPath = Path.Combine(Fixture.ApplicationPath, "Views", "Home", "About.cshtml"); @@ -34,7 +31,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation viewImportsPath + " (1): A space or line break was encountered after the \"@\" character. Only valid identifiers, keywords, comments, \"(\" and \"{\" are valid at the start of a code block and they must occur immediately following \"@\" with no space in between.", }; - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { // Act & Assert Assert.Throws(() => deployer.Deploy()); @@ -49,7 +46,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation } } - public class ApplicationWithParseErrorsFixture : ApplicationTestFixture { public ApplicationWithParseErrorsFixture() @@ -59,9 +55,9 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public TestSink TestSink { get; } = new TestSink(); - protected override ILogger CreateLogger(RuntimeFlavor flavor) + protected override ILogger CreateLogger() { - return new TestLoggerFactory(TestSink, enabled: true).CreateLogger($"{ApplicationName}:{flavor}"); + return new TestLoggerFactory(TestSink, enabled: true).CreateLogger($"{ApplicationName}"); } } } diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithTagHelpersTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithTagHelpersTest.cs index 8b79ace4ed..0579013eb6 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithTagHelpersTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationWithTagHelpersTest.cs @@ -1,11 +1,8 @@ // 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.Collections.Generic; using System.IO; -using System.Linq; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.IntegrationTesting; using Xunit; namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation @@ -19,27 +16,24 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public ApplicationTestFixture Fixture { get; } - public static IEnumerable ApplicationWithTagHelpersData + public static TheoryData ApplicationWithTagHelpersData { get { - var urls = new[] + return new TheoryData { "ClassLibraryTagHelper", "LocalTagHelper", - "NuGetPackageTagHelper", }; - - return Enumerable.Zip(urls, RuntimeFlavors.SupportedFlavors, (a, b) => new object[] { a, b }); } } [Theory] [MemberData(nameof(ApplicationWithTagHelpersData))] - public async Task Precompilation_WorksForViewsThatUseTagHelpers(string url, RuntimeFlavor flavor) + public async Task Precompilation_WorksForViewsThatUseTagHelpers(string url) { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/ApplicationTestFixture.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/ApplicationTestFixture.cs index df08d0e20c..91b71be28b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/ApplicationTestFixture.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/ApplicationTestFixture.cs @@ -37,16 +37,16 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public ILogger Logger { get; private set; } - public IApplicationDeployer CreateDeployment(RuntimeFlavor flavor) + public IApplicationDeployer CreateDeployment() { - PrepareForDeployment(flavor); - var deploymentParameters = GetDeploymentParameters(flavor); + PrepareForDeployment(); + var deploymentParameters = GetDeploymentParameters(); return ApplicationDeployerFactory.Create(deploymentParameters, Logger); } - public virtual void PrepareForDeployment(RuntimeFlavor flavor) + public virtual void PrepareForDeployment() { - Logger = CreateLogger(flavor); + Logger = CreateLogger(); if (!_isRestored) { @@ -55,7 +55,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation } } - public virtual DeploymentParameters GetDeploymentParameters(RuntimeFlavor flavor) + public virtual DeploymentParameters GetDeploymentParameters() { var tempRestoreDirectoryEnvironment = new KeyValuePair( NuGetPackagesEnvironmentKey, @@ -72,11 +72,15 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation var deploymentParameters = new DeploymentParameters( ApplicationPath, ServerType.Kestrel, - flavor, + RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { PublishApplicationBeforeDeployment = true, - TargetFramework = flavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.1", +#if NETCOREAPP1_1 + TargetFramework = "netcoreapp1.1", +#else +#error the target framework needs to be updated. +#endif Configuration = "Release", EnvironmentVariables = { @@ -95,11 +99,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation return deploymentParameters; } - protected virtual ILogger CreateLogger(RuntimeFlavor flavor) + protected virtual ILogger CreateLogger() { return new LoggerFactory() .AddConsole() - .CreateLogger($"{ApplicationName}:{flavor}"); + .CreateLogger($"{ApplicationName}"); } protected virtual void Restore() diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/RuntimeFlavors.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/RuntimeFlavors.cs deleted file mode 100644 index baa8087a75..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/RuntimeFlavors.cs +++ /dev/null @@ -1,39 +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.Collections.Generic; -using System.Runtime.InteropServices; -using Microsoft.AspNetCore.Server.IntegrationTesting; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation -{ - public static class RuntimeFlavors - { - public static IEnumerable SupportedFlavors - { - get - { - yield return RuntimeFlavor.CoreClr; - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - yield return RuntimeFlavor.Clr; - } - } - } - - public static TheoryData SupportedFlavorsTheoryData - { - get - { - var theory = new TheoryData(); - foreach (var item in SupportedFlavors) - { - theory.Add(item); - } - - return theory; - } - } - } -} diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/TestEmbeddedResource.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/TestEmbeddedResource.cs index 76062ed913..feee9544d6 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/TestEmbeddedResource.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/TestEmbeddedResource.cs @@ -54,6 +54,5 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation return streamReader.ReadToEnd().Replace("\r", "").Replace("\n", "\r\n"); } } - } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/PublishWithEmbedViewSourcesTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/PublishWithEmbedViewSourcesTest.cs index 1ae6b77938..0f5f9727a1 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/PublishWithEmbedViewSourcesTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/PublishWithEmbedViewSourcesTest.cs @@ -2,11 +2,9 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.IntegrationTesting; using Xunit; namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests @@ -23,11 +21,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests public ApplicationTestFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task Precompilation_CanEmbedViewSourcesAsResources(RuntimeFlavor flavor) + [Fact] + public async Task Precompilation_CanEmbedViewSourcesAsResources() { // Arrange var expectedViews = new[] @@ -37,7 +32,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests "/Views/Home/Index.cshtml", }; var expectedText = "Hello Index!"; - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); var assemblyPath = Path.Combine( diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppDesktopOnly.Home.Index.txt b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppDesktopOnly.Home.Index.txt deleted file mode 100644 index 70675c45a5..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppDesktopOnly.Home.Index.txt +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - Home Page - SimpleApp - - - - - - - - - - -
- -AspNetCore._Views_Home_Index_cshtml, SimpleAppDesktopOnly.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -
-
-

© 2016 - SimpleApp

-
-
- - - - - - - - - - - - AspNetCore._Views_Shared__Layout_cshtml, SimpleAppDesktopOnly.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppMvc11Test.Home.Index.txt b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppMvc11Test.Home.Index.txt deleted file mode 100644 index c963a4268b..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppMvc11Test.Home.Index.txt +++ /dev/null @@ -1,3 +0,0 @@ -Hello from Index: AspNetCore._Views_Home_Index_cshtml, SimpleAppMvc11.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - -AspNetCore._Views_Shared__Layout_cshtml, SimpleAppMvc11.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppX86DesktopOnly.Home.Index.txt b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppX86DesktopOnly.Home.Index.txt deleted file mode 100644 index 50c970046c..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Resources/SimpleAppX86DesktopOnly.Home.Index.txt +++ /dev/null @@ -1 +0,0 @@ -AspNetCore._Views_Home_Index_cshtml, SimpleAppX86DesktopOnly.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppDesktopOnlyTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppDesktopOnlyTest.cs deleted file mode 100644 index 191581d4d9..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppDesktopOnlyTest.cs +++ /dev/null @@ -1,48 +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.Server.IntegrationTesting; -using Microsoft.AspNetCore.Testing.xunit; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation -{ - public class SimpleAppDesktopOnlyTest : IClassFixture - { - public SimpleAppDesktopOnlyTest(SimpleAppDesktopOnlyTestFixture fixture) - { - Fixture = fixture; - } - - public ApplicationTestFixture Fixture { get; } - - [ConditionalFact] - [OSSkipConditionAttribute(OperatingSystems.Linux)] - [OSSkipConditionAttribute(OperatingSystems.MacOSX)] - public async Task Precompilation_WorksForSimpleApps() - { - // Arrange - using (var deployer = Fixture.CreateDeployment(RuntimeFlavor.Clr)) - { - var deploymentResult = deployer.Deploy(); - - // Act - var response = await Fixture.HttpClient.GetStringWithRetryAsync( - deploymentResult.ApplicationBaseUri, - Fixture.Logger); - - // Assert - TestEmbeddedResource.AssertContent("SimpleAppDesktopOnly.Home.Index.txt", response); - } - } - - public class SimpleAppDesktopOnlyTestFixture : ApplicationTestFixture - { - public SimpleAppDesktopOnlyTestFixture() - : base("SimpleAppDesktopOnly") - { - } - } - } -} diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppTest.cs index 3e9e48007d..a88ecabb9f 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppTest.cs @@ -18,14 +18,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public ApplicationTestFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task Precompilation_WorksForSimpleApps(RuntimeFlavor flavor) + [Fact] + public async Task Precompilation_WorksForSimpleApps() { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppWithAssemblyRenameTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppWithAssemblyRenameTest.cs index d675f9362b..f0c7bcdfa5 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppWithAssemblyRenameTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppWithAssemblyRenameTest.cs @@ -7,23 +7,20 @@ using Xunit; namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation { - public class SimpleAppWithAssemblyRenameTest : IClassFixture + public class SimpleAppWithAssemblyRenameTest : IClassFixture { - public SimpleAppWithAssemblyRenameTest(SimpleAppWithAssemblyRenameTestFixture fixture) + public SimpleAppWithAssemblyRenameTest(TestFixture fixture) { Fixture = fixture; } public ApplicationTestFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task Precompilation_WorksForSimpleApps(RuntimeFlavor flavor) + [Fact] + public async Task Precompilation_WorksForSimpleApps() { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); @@ -37,16 +34,16 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation } } - public class SimpleAppWithAssemblyRenameTestFixture : ApplicationTestFixture + public class TestFixture : ApplicationTestFixture { - public SimpleAppWithAssemblyRenameTestFixture() + public TestFixture() : base("SimpleAppWithAssemblyRename") { } - public override DeploymentParameters GetDeploymentParameters(RuntimeFlavor flavor) + public override DeploymentParameters GetDeploymentParameters() { - var parameters = base.GetDeploymentParameters(flavor); + var parameters = base.GetDeploymentParameters(); parameters.ApplicationName = "NewAssemblyName"; return parameters; } diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppX86DesktopOnlyTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppX86DesktopOnlyTest.cs deleted file mode 100644 index 014751bfd5..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/SimpleAppX86DesktopOnlyTest.cs +++ /dev/null @@ -1,48 +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.Server.IntegrationTesting; -using Microsoft.AspNetCore.Testing.xunit; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation -{ - public class SimpleAppX86DesktopOnlyTest : IClassFixture - { - public SimpleAppX86DesktopOnlyTest(SimpleAppX86DesktopOnlyFixture fixture) - { - Fixture = fixture; - } - - public ApplicationTestFixture Fixture { get; } - - [ConditionalFact] - [OSSkipCondition(OperatingSystems.Linux)] - [OSSkipCondition(OperatingSystems.MacOSX)] - public async Task Precompilation_WorksForSimpleApps() - { - // Arrange - using (var deployer = Fixture.CreateDeployment(RuntimeFlavor.Clr)) - { - var deploymentResult = deployer.Deploy(); - - // Act - var response = await Fixture.HttpClient.GetStringWithRetryAsync( - deploymentResult.ApplicationBaseUri, - Fixture.Logger); - - // Assert - TestEmbeddedResource.AssertContent("SimpleAppX86DesktopOnly.Home.Index.txt", response); - } - } - - public class SimpleAppX86DesktopOnlyFixture : ApplicationTestFixture - { - public SimpleAppX86DesktopOnlyFixture() - : base("SimpleAppX86DesktopOnly") - { - } - } - } -} diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/StrongNamedAppTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/StrongNamedAppTest.cs index 8b13cf027e..008e8b2279 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/StrongNamedAppTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/StrongNamedAppTest.cs @@ -1,10 +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.Collections.Generic; -using System.Linq; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.IntegrationTesting; using Xunit; namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation @@ -18,14 +15,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public ApplicationTestFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public async Task PrecompiledAssembliesUseSameStrongNameAsApplication(RuntimeFlavor flavor) + [Fact] + public async Task PrecompiledAssembliesUseSameStrongNameAsApplication() { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { var deploymentResult = deployer.Deploy(); diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ViewCompilationOptionsTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ViewCompilationOptionsTest.cs index adafc8785d..15cca9e383 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ViewCompilationOptionsTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ViewCompilationOptionsTest.cs @@ -17,14 +17,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation public ApplicationTestFixture Fixture { get; } - public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData; - - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public void Precompilation_PreventsRefAssembliesFromBeingPublished(RuntimeFlavor flavor) + [Fact] + public void Precompilation_PreventsRefAssembliesFromBeingPublished() { // Arrange - using (var deployer = Fixture.CreateDeployment(flavor)) + using (var deployer = Fixture.CreateDeployment()) { // Act var deploymentResult = deployer.Deploy(); @@ -34,13 +31,12 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation } } - [Theory] - [MemberData(nameof(SupportedFlavorsTheoryData))] - public void PublishingWithOption_AllowsPublishingRefAssemblies(RuntimeFlavor flavor) + [Fact] + public void PublishingWithOption_AllowsPublishingRefAssemblies() { // Arrange - Fixture.PrepareForDeployment(flavor); - var deploymentParameters = Fixture.GetDeploymentParameters(flavor); + Fixture.PrepareForDeployment(); + var deploymentParameters = Fixture.GetDeploymentParameters(); deploymentParameters.PublishEnvironmentVariables.Add( new KeyValuePair("MvcRazorExcludeRefAssembliesFromPublish", "false")); diff --git a/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj b/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj index f5b94db0fb..576633ddd5 100644 --- a/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj +++ b/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj @@ -1,10 +1,8 @@ - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe - win7-x64 true diff --git a/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj b/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj index 63988f10b7..c447f7a047 100644 --- a/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj +++ b/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj @@ -1,10 +1,8 @@ - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe - win7-x64 true diff --git a/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj b/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj index 63988f10b7..c447f7a047 100644 --- a/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj +++ b/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj @@ -1,10 +1,8 @@ - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe - win7-x64 true diff --git a/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj b/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj index e29daf1700..40565cf420 100644 --- a/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj +++ b/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj @@ -1,10 +1,8 @@  - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe - win7-x64 true true diff --git a/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj b/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj index 3781e1374c..0a19352d3a 100644 --- a/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj +++ b/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj @@ -1,10 +1,8 @@  - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe - win7-x64 true diff --git a/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj b/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj index 2a4188b13e..9d18cad2e8 100644 --- a/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj +++ b/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj @@ -1,11 +1,8 @@ - netcoreapp1.1;net451 - win7-x64 - true + netcoreapp1.1 Exe - win7-x64 true @@ -22,6 +19,5 @@ - diff --git a/testapps/ApplicationWithTagHelpers/Controllers/HomeController.cs b/testapps/ApplicationWithTagHelpers/Controllers/HomeController.cs index 0e94a2ea33..de245b1916 100644 --- a/testapps/ApplicationWithTagHelpers/Controllers/HomeController.cs +++ b/testapps/ApplicationWithTagHelpers/Controllers/HomeController.cs @@ -8,8 +8,6 @@ namespace ApplicationWithTagHelpers.Controllers public IActionResult LocalTagHelper() => View(); - public IActionResult NuGetPackageTagHelper() => View(); - public IActionResult About() => Content("About content"); } } diff --git a/testapps/ApplicationWithTagHelpers/Views/Home/NuGetPackageTagHelper.cshtml b/testapps/ApplicationWithTagHelpers/Views/Home/NuGetPackageTagHelper.cshtml deleted file mode 100644 index 2175afad17..0000000000 --- a/testapps/ApplicationWithTagHelpers/Views/Home/NuGetPackageTagHelper.cshtml +++ /dev/null @@ -1,12 +0,0 @@ -@addTagHelper *, TagHelperSamples.Bootstrap - -@GetType().AssemblyQualifiedName - - -

Something happened

-

Something happened

-
-
- - diff --git a/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj b/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj index 359833cf31..18082d801a 100644 --- a/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj +++ b/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj @@ -2,7 +2,7 @@ - netstandard1.6;net451 + netstandard1.6 diff --git a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj index 3b0943e23d..8847f1713e 100644 --- a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj +++ b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj @@ -2,10 +2,8 @@ 1.0.0-z$([System.DateTime]::UtcNow.Ticks) - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe - win7-x64 obj\precompiled\$(TargetFramework) diff --git a/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj b/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj index d3e09e6da2..054b6e9527 100644 --- a/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj +++ b/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj @@ -1,10 +1,8 @@ - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe - win7-x64 true true diff --git a/testapps/SimpleApp/SimpleApp.csproj b/testapps/SimpleApp/SimpleApp.csproj index 3781e1374c..0a19352d3a 100644 --- a/testapps/SimpleApp/SimpleApp.csproj +++ b/testapps/SimpleApp/SimpleApp.csproj @@ -1,10 +1,8 @@  - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe - win7-x64 true diff --git a/testapps/SimpleAppDesktopOnly/Controllers/HomeController.cs b/testapps/SimpleAppDesktopOnly/Controllers/HomeController.cs deleted file mode 100644 index 0b44851019..0000000000 --- a/testapps/SimpleAppDesktopOnly/Controllers/HomeController.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace SimpleApp.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() => View(); - } -} diff --git a/testapps/SimpleAppDesktopOnly/Program.cs b/testapps/SimpleAppDesktopOnly/Program.cs deleted file mode 100644 index 6ed39c5e32..0000000000 --- a/testapps/SimpleAppDesktopOnly/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.IO; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace SimpleApp -{ - 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/SimpleAppDesktopOnly/SimpleAppDesktopOnly.csproj b/testapps/SimpleAppDesktopOnly/SimpleAppDesktopOnly.csproj deleted file mode 100644 index ea20b0002c..0000000000 --- a/testapps/SimpleAppDesktopOnly/SimpleAppDesktopOnly.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - net451 - win7-x64 - true - Exe - true - - - - - - 1.2.0-* - All - - - - - - diff --git a/testapps/SimpleAppDesktopOnly/Startup.cs b/testapps/SimpleAppDesktopOnly/Startup.cs deleted file mode 100644 index 461873a890..0000000000 --- a/testapps/SimpleAppDesktopOnly/Startup.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace SimpleApp -{ - 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: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - }); - } - } -} diff --git a/testapps/SimpleAppDesktopOnly/Views/Home/Index.cshtml b/testapps/SimpleAppDesktopOnly/Views/Home/Index.cshtml deleted file mode 100644 index 9c6b7fb5ff..0000000000 --- a/testapps/SimpleAppDesktopOnly/Views/Home/Index.cshtml +++ /dev/null @@ -1,5 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -@GetType().AssemblyQualifiedName \ No newline at end of file diff --git a/testapps/SimpleAppDesktopOnly/Views/Shared/_Layout.cshtml b/testapps/SimpleAppDesktopOnly/Views/Shared/_Layout.cshtml deleted file mode 100644 index 4f65b1d219..0000000000 --- a/testapps/SimpleAppDesktopOnly/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - @ViewData["Title"] - SimpleApp - - - - - - - - - - - - -
- @RenderBody() -
-
-

© 2016 - SimpleApp

-
-
- - - - - - - - - - - - - @RenderSection("scripts", required: false) - @GetType().AssemblyQualifiedName - - diff --git a/testapps/SimpleAppDesktopOnly/Views/_ViewImports.cshtml b/testapps/SimpleAppDesktopOnly/Views/_ViewImports.cshtml deleted file mode 100644 index 71413f674c..0000000000 --- a/testapps/SimpleAppDesktopOnly/Views/_ViewImports.cshtml +++ /dev/null @@ -1,2 +0,0 @@ -@using SimpleApp -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/testapps/SimpleAppDesktopOnly/Views/_ViewStart.cshtml b/testapps/SimpleAppDesktopOnly/Views/_ViewStart.cshtml deleted file mode 100644 index a5f10045db..0000000000 --- a/testapps/SimpleAppDesktopOnly/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "_Layout"; -} diff --git a/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj b/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj index 873cd3718e..f34abbf8f5 100644 --- a/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj +++ b/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj @@ -2,10 +2,8 @@ NewAssemblyName - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe - win7-x64 true diff --git a/testapps/SimpleAppX86DesktopOnly/Controllers/HomeController.cs b/testapps/SimpleAppX86DesktopOnly/Controllers/HomeController.cs deleted file mode 100644 index 0b44851019..0000000000 --- a/testapps/SimpleAppX86DesktopOnly/Controllers/HomeController.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace SimpleApp.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() => View(); - } -} diff --git a/testapps/SimpleAppX86DesktopOnly/Program.cs b/testapps/SimpleAppX86DesktopOnly/Program.cs deleted file mode 100644 index 6ed39c5e32..0000000000 --- a/testapps/SimpleAppX86DesktopOnly/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.IO; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace SimpleApp -{ - 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/SimpleAppX86DesktopOnly/SimpleAppX86DesktopOnly.csproj b/testapps/SimpleAppX86DesktopOnly/SimpleAppX86DesktopOnly.csproj deleted file mode 100644 index 8c6edfee7d..0000000000 --- a/testapps/SimpleAppX86DesktopOnly/SimpleAppX86DesktopOnly.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - net451 - win7-x86 - true - Exe - true - - - - - - 1.2.0-* - All - - - - - - diff --git a/testapps/SimpleAppX86DesktopOnly/Startup.cs b/testapps/SimpleAppX86DesktopOnly/Startup.cs deleted file mode 100644 index 461873a890..0000000000 --- a/testapps/SimpleAppX86DesktopOnly/Startup.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace SimpleApp -{ - 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: "default", - template: "{controller=Home}/{action=Index}/{id?}"); - }); - } - } -} diff --git a/testapps/SimpleAppX86DesktopOnly/Views/Home/Index.cshtml b/testapps/SimpleAppX86DesktopOnly/Views/Home/Index.cshtml deleted file mode 100644 index 096681fc55..0000000000 --- a/testapps/SimpleAppX86DesktopOnly/Views/Home/Index.cshtml +++ /dev/null @@ -1 +0,0 @@ -@GetType().AssemblyQualifiedName \ No newline at end of file diff --git a/testapps/StrongNamedApp/StrongNamedApp.csproj b/testapps/StrongNamedApp/StrongNamedApp.csproj index 16f2e181fc..30d5dfeca1 100644 --- a/testapps/StrongNamedApp/StrongNamedApp.csproj +++ b/testapps/StrongNamedApp/StrongNamedApp.csproj @@ -1,13 +1,11 @@ - netcoreapp1.1;net451 - true + netcoreapp1.1 Exe ../../build/Key.snk true true - win7-x64 true diff --git a/testapps/TestApps.sln b/testapps/TestApps.sln index 895613aa07..67ec53c08d 100644 --- a/testapps/TestApps.sln +++ b/testapps/TestApps.sln @@ -21,8 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PublishWIthEmbedViewSources EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StrongNamedApp", "StrongNamedApp\StrongNamedApp.csproj", "{88903BE5-0676-4667-8160-B24646E0B76E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleAppDesktopOnly", "SimpleAppDesktopOnly\SimpleAppDesktopOnly.csproj", "{A0B0A141-A32B-4F33-B85F-5CA8C107105F}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleAppWithAssemblyRename", "SimpleAppWithAssemblyRename\SimpleAppWithAssemblyRename.csproj", "{3AAF7A48-333C-4D1A-A12B-A3B77DEADF4B}" EndProject Global @@ -55,10 +53,6 @@ Global {88903BE5-0676-4667-8160-B24646E0B76E}.Debug|Any CPU.Build.0 = Debug|Any CPU {88903BE5-0676-4667-8160-B24646E0B76E}.Release|Any CPU.ActiveCfg = Release|Any CPU {88903BE5-0676-4667-8160-B24646E0B76E}.Release|Any CPU.Build.0 = Release|Any CPU - {A0B0A141-A32B-4F33-B85F-5CA8C107105F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A0B0A141-A32B-4F33-B85F-5CA8C107105F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A0B0A141-A32B-4F33-B85F-5CA8C107105F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A0B0A141-A32B-4F33-B85F-5CA8C107105F}.Release|Any CPU.Build.0 = Release|Any CPU {3AAF7A48-333C-4D1A-A12B-A3B77DEADF4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3AAF7A48-333C-4D1A-A12B-A3B77DEADF4B}.Debug|Any CPU.Build.0 = Debug|Any CPU {3AAF7A48-333C-4D1A-A12B-A3B77DEADF4B}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/tools/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.csproj b/tools/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.csproj deleted file mode 100644 index 9aa07eb00f..0000000000 --- a/tools/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Build-time references required to enable Razor view compilation as part of building the application. - net451 - win7-x86 - exe - ..\..\src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation - - - - - - - - - - - - \ No newline at end of file