diff --git a/Mvc.sln b/Mvc.sln index 6105495fb1..7894b601af 100644 --- a/Mvc.sln +++ b/Mvc.sln @@ -129,6 +129,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Ra EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.RazorPages.Test", "test\Microsoft.AspNetCore.Mvc.RazorPages.Test\Microsoft.AspNetCore.Mvc.RazorPages.Test.xproj", "{0AB46520-F441-4E01-B444-08F4D23F8B1B}" EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RazorPagesWebSite", "test\WebSites\RazorPagesWebSite\RazorPagesWebSite.xproj", "{4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -769,6 +771,18 @@ Global {0AB46520-F441-4E01-B444-08F4D23F8B1B}.Release|Mixed Platforms.Build.0 = Release|Any CPU {0AB46520-F441-4E01-B444-08F4D23F8B1B}.Release|x86.ActiveCfg = Release|Any CPU {0AB46520-F441-4E01-B444-08F4D23F8B1B}.Release|x86.Build.0 = Release|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Debug|x86.ActiveCfg = Debug|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Debug|x86.Build.0 = Debug|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Release|Any CPU.Build.0 = Release|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Release|x86.ActiveCfg = Release|Any CPU + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -832,5 +846,6 @@ Global {D28CAC79-7004-4B69-993B-EDEB4653BFA8} = {16703B76-C9F7-4C75-AE6C-53D92E308E3C} {CF322BE1-E1FE-4CFD-8FCA-16A14B905D53} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} {0AB46520-F441-4E01-B444-08F4D23F8B1B} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1} + {4BA6EC9A-B6D9-41F2-BFDA-D82B22D80352} = {16703B76-C9F7-4C75-AE6C-53D92E308E3C} EndGlobalSection EndGlobal diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/project.json b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/project.json index adce73e729..e02670586c 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/project.json +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/project.json @@ -60,6 +60,9 @@ "RazorPageExecutionInstrumentationWebSite": { "target": "project" }, + "RazorPagesWebSite": { + "target": "project" + }, "RazorWebSite": { "target": "project" }, diff --git a/test/WebSites/RazorPagesWebSite/Program.cs b/test/WebSites/RazorPagesWebSite/Program.cs new file mode 100644 index 0000000000..1f48674aba --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/Program.cs @@ -0,0 +1,23 @@ +// 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.IO; +using Microsoft.AspNetCore.Hosting; + +namespace RazorPagesWebSite +{ + public class Program + { + public static void Main(string[] args) + { + var host = new WebHostBuilder() + .UseKestrel() + .UseContentRoot(Directory.GetCurrentDirectory()) + .UseIISIntegration() + .UseStartup() + .Build(); + + host.Run(); + } + } +} diff --git a/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.xproj b/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.xproj new file mode 100644 index 0000000000..dd7cd78722 --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.xproj @@ -0,0 +1,25 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + 4ba6ec9a-b6d9-41f2-bfda-d82b22d80352 + RazorPagesWebSite + .\obj + .\bin\ + v4.5.2 + + + + 2.0 + + + + + + + diff --git a/test/WebSites/RazorPagesWebSite/Startup.cs b/test/WebSites/RazorPagesWebSite/Startup.cs new file mode 100644 index 0000000000..e563d2241a --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/Startup.cs @@ -0,0 +1,25 @@ +// 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.Builder; +using Microsoft.Extensions.DependencyInjection; + +namespace RazorPagesWebSite +{ + public class Startup + { + public void ConfigureServices(IServiceCollection services) + { + services.AddMvc(); + } + + public void Configure(IApplicationBuilder app) + { + app.UseCultureReplacer(); + + app.UseStaticFiles(); + + app.UseMvc(); + } + } +} diff --git a/test/WebSites/RazorPagesWebSite/project.json b/test/WebSites/RazorPagesWebSite/project.json new file mode 100644 index 0000000000..ddcbd3db43 --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/project.json @@ -0,0 +1,44 @@ +{ + "buildOptions": { + "emitEntryPoint": true, + "preserveCompilationContext": true + }, + "dependencies": { + "Microsoft.AspNetCore.Mvc": "1.2.0-*", + "Microsoft.AspNetCore.Mvc.TestConfiguration": { + "target": "project" + }, + "Microsoft.AspNetCore.Razor.Tools": { + "type": "build", + "version": "1.1.0-preview4-final" + }, + "Microsoft.AspNetCore.Server.IISIntegration": "1.2.0-*", + "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", + "Microsoft.AspNetCore.StaticFiles": "1.2.0-*" + }, + "frameworks": { + "net452": {}, + "netcoreapp1.1": { + "dependencies": { + "Microsoft.NETCore.App": { + "version": "1.1.0", + "type": "platform" + } + } + } + }, + "publishOptions": { + "include": [ + "Views", + "web.config", + "wwwroot" + ] + }, + "tools": { + "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final", + "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final" + }, + "scripts": { + "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" + } +} diff --git a/test/WebSites/RazorPagesWebSite/readme.md b/test/WebSites/RazorPagesWebSite/readme.md new file mode 100644 index 0000000000..1fa2cd4151 --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/readme.md @@ -0,0 +1,4 @@ +RazorPagesWebSite +=== + +This web site is used for functional tests of the Razor Pages feature of MVC. diff --git a/test/WebSites/RazorPagesWebSite/web.config b/test/WebSites/RazorPagesWebSite/web.config new file mode 100644 index 0000000000..dc0514fca5 --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/web.config @@ -0,0 +1,14 @@ + + + + + + + + + + + +