diff --git a/RazorViewCompilation.sln b/RazorViewCompilation.sln index 3e35780..8396316 100644 --- a/RazorViewCompilation.sln +++ b/RazorViewCompilation.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27130.2036 MinimumVisualStudioVersion = 15.0.26730.03 @@ -46,8 +46,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StrongNamedApp", "testapps\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationWithParseErrors", "testapps\ApplicationWithParseErrors\ApplicationWithParseErrors.csproj", "{AF647059-B86B-46DD-9559-E1324A39B148}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationUsingRelativePaths", "testapps\ApplicationUsingRelativePaths\ApplicationUsingRelativePaths.csproj", "{0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationWithConfigureMvc", "testapps\ApplicationWithConfigureMvc\ApplicationWithConfigureMvc.csproj", "{559FBB83-40BC-47AF-A224-312CF8E3629B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationWithCustomInputFiles", "testapps\ApplicationWithCustomInputFiles\ApplicationWithCustomInputFiles.csproj", "{8F73A290-BCE1-461A-9970-397FFBFCC902}" @@ -177,18 +175,6 @@ Global {AF647059-B86B-46DD-9559-E1324A39B148}.Release|x64.Build.0 = Release|Any CPU {AF647059-B86B-46DD-9559-E1324A39B148}.Release|x86.ActiveCfg = Release|Any CPU {AF647059-B86B-46DD-9559-E1324A39B148}.Release|x86.Build.0 = Release|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Debug|x64.ActiveCfg = Debug|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Debug|x64.Build.0 = Debug|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Debug|x86.ActiveCfg = Debug|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Debug|x86.Build.0 = Debug|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Release|Any CPU.Build.0 = Release|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Release|x64.ActiveCfg = Release|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Release|x64.Build.0 = Release|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Release|x86.ActiveCfg = Release|Any CPU - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8}.Release|x86.Build.0 = Release|Any CPU {559FBB83-40BC-47AF-A224-312CF8E3629B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {559FBB83-40BC-47AF-A224-312CF8E3629B}.Debug|Any CPU.Build.0 = Debug|Any CPU {559FBB83-40BC-47AF-A224-312CF8E3629B}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -310,7 +296,6 @@ Global {7EFC460A-8BAA-4538-8EBE-0B3BB6101E94} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} {87C6A03D-1655-4D1C-82E5-8F553BF4096D} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} {AF647059-B86B-46DD-9559-E1324A39B148} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} - {0B512D79-AA53-4C97-91B3-B0F8B2CA16B8} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7} {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} diff --git a/test/FunctionalTests/CoreCLRTests/ApplicationUsingRelativePathsTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/ApplicationUsingRelativePathsTest_CoreCLR.cs deleted file mode 100644 index e115718..0000000 --- a/test/FunctionalTests/CoreCLRTests/ApplicationUsingRelativePathsTest_CoreCLR.cs +++ /dev/null @@ -1,60 +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 ApplicationUsingRelativePathsTest_CoreCLR : - LoggedTest, IClassFixture> - { - public ApplicationUsingRelativePathsTest_CoreCLR( - CoreCLRApplicationTestFixture fixture, - ITestOutputHelper output) - : base(output) - { - Fixture = fixture; - } - - public ApplicationTestFixture Fixture { get; } - - [Fact] - public async Task Precompilation_WorksForViewsUsingRelativePath() - { - using (StartLog(out var loggerFactory)) - { - // Arrange - var deployment = await Fixture.CreateDeploymentAsync(loggerFactory); - - // Act - var response = await deployment.HttpClient.GetStringWithRetryAsync( - deployment.ApplicationBaseUri, - loggerFactory.CreateLogger(Fixture.ApplicationName)); - - // Assert - TestEmbeddedResource.AssertContent("ApplicationUsingRelativePaths.Home.Index.txt", response); - } - } - - [Fact] - public async Task Precompilation_WorksForViewsUsingDirectoryTraversal() - { - using (StartLog(out var loggerFactory)) - { - // Arrange - var deployment = await Fixture.CreateDeploymentAsync(loggerFactory); - - // Act - var response = await deployment.HttpClient.GetStringWithRetryAsync( - deployment.ApplicationBaseUri, - loggerFactory.CreateLogger(Fixture.ApplicationName)); - - // Assert - TestEmbeddedResource.AssertContent("ApplicationUsingRelativePaths.Home.About.txt", response); - } - } - } -} diff --git a/test/FunctionalTests/DesktopTests/ApplicationUsingRelativePathsTest_Desktop.cs b/test/FunctionalTests/DesktopTests/ApplicationUsingRelativePathsTest_Desktop.cs deleted file mode 100644 index 4122fb7..0000000 --- a/test/FunctionalTests/DesktopTests/ApplicationUsingRelativePathsTest_Desktop.cs +++ /dev/null @@ -1,63 +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 ApplicationUsingRelativePathsTest_Desktop : - LoggedTest, IClassFixture> - { - public ApplicationUsingRelativePathsTest_Desktop( - DesktopApplicationTestFixture fixture, - ITestOutputHelper output) - : base(output) - { - Fixture = fixture; - } - - public ApplicationTestFixture Fixture { get; } - - [ConditionalFact] - public async Task Precompilation_WorksForViewsUsingRelativePath() - { - using (StartLog(out var loggerFactory)) - { - // Arrange - var deployment = await Fixture.CreateDeploymentAsync(loggerFactory); - - // Act - var response = await deployment.HttpClient.GetStringWithRetryAsync( - deployment.ApplicationBaseUri, - loggerFactory.CreateLogger(Fixture.ApplicationName)); - - // Assert - TestEmbeddedResource.AssertContent("ApplicationUsingRelativePaths.Home.Index.txt", response); - } - } - - [ConditionalFact] - public async Task Precompilation_WorksForViewsUsingDirectoryTraversal() - { - using (StartLog(out var loggerFactory)) - { - // Arrange - var deployment = await Fixture.CreateDeploymentAsync(loggerFactory); - - // Act - var response = await deployment.HttpClient.GetStringWithRetryAsync( - deployment.ApplicationBaseUri, - loggerFactory.CreateLogger(Fixture.ApplicationName)); - - // Assert - TestEmbeddedResource.AssertContent("ApplicationUsingRelativePaths.Home.About.txt", response); - } - } - } -} diff --git a/test/FunctionalTests/FunctionalTests.csproj b/test/FunctionalTests/FunctionalTests.csproj index 7a6a4d8..5c8fa36 100644 --- a/test/FunctionalTests/FunctionalTests.csproj +++ b/test/FunctionalTests/FunctionalTests.csproj @@ -34,7 +34,6 @@ - diff --git a/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj b/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj deleted file mode 100644 index 91b6481..0000000 --- a/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - $(StandardTestAppTfms) - - true - - - - - - - - - - diff --git a/testapps/ApplicationUsingRelativePaths/Controllers/HomeController.cs b/testapps/ApplicationUsingRelativePaths/Controllers/HomeController.cs deleted file mode 100644 index 33ac0b1..0000000 --- a/testapps/ApplicationUsingRelativePaths/Controllers/HomeController.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace ApplicationUsingRelativePaths.Controllers -{ - public class HomeController : Controller - { - public IActionResult Index() - { - return View("Views/Home/Index.cshtml"); - } - - public IActionResult About() - { - ViewData["Message"] = "Your application description page."; - - return View(); - } - } -} diff --git a/testapps/ApplicationUsingRelativePaths/Program.cs b/testapps/ApplicationUsingRelativePaths/Program.cs deleted file mode 100644 index 5d496db..0000000 --- a/testapps/ApplicationUsingRelativePaths/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.IO; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace ApplicationUsingRelativePaths -{ - 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/ApplicationUsingRelativePaths/Startup.cs b/testapps/ApplicationUsingRelativePaths/Startup.cs deleted file mode 100644 index 9f7dbdf..0000000 --- a/testapps/ApplicationUsingRelativePaths/Startup.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace ApplicationUsingRelativePaths -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - } - - public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(); - app.UseMvcWithDefaultRoute(); - } - } -} diff --git a/testapps/ApplicationUsingRelativePaths/Views/Home/About.cshtml b/testapps/ApplicationUsingRelativePaths/Views/Home/About.cshtml deleted file mode 100644 index bbc0672..0000000 --- a/testapps/ApplicationUsingRelativePaths/Views/Home/About.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@{ - Layout = "../Shared/_Layout.cshtml"; - ViewData["Title"] = "About"; -} -

@ViewData["Title"].

-

@ViewData["Message"]

- -

Use this area to provide additional information.

diff --git a/testapps/ApplicationUsingRelativePaths/Views/Home/Index.cshtml b/testapps/ApplicationUsingRelativePaths/Views/Home/Index.cshtml deleted file mode 100644 index b2bf7cf..0000000 --- a/testapps/ApplicationUsingRelativePaths/Views/Home/Index.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -@GetType().Assembly.FullName -Hello from Index! \ No newline at end of file diff --git a/testapps/ApplicationUsingRelativePaths/Views/Shared/_Layout.cshtml b/testapps/ApplicationUsingRelativePaths/Views/Shared/_Layout.cshtml deleted file mode 100644 index 4c90941..0000000 --- a/testapps/ApplicationUsingRelativePaths/Views/Shared/_Layout.cshtml +++ /dev/null @@ -1,6 +0,0 @@ - - - - @RenderBody() - - \ No newline at end of file diff --git a/testapps/ApplicationUsingRelativePaths/Views/_ViewImports.cshtml b/testapps/ApplicationUsingRelativePaths/Views/_ViewImports.cshtml deleted file mode 100644 index 64245a9..0000000 --- a/testapps/ApplicationUsingRelativePaths/Views/_ViewImports.cshtml +++ /dev/null @@ -1,2 +0,0 @@ -@using ApplicationUsingRelativePaths -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/testapps/ApplicationUsingRelativePaths/Views/_ViewStart.cshtml b/testapps/ApplicationUsingRelativePaths/Views/_ViewStart.cshtml deleted file mode 100644 index 1b4f3a0..0000000 --- a/testapps/ApplicationUsingRelativePaths/Views/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "Shared/_Layout.cshtml"; -}