diff --git a/README.md b/README.md index 8e4abd4..19ea6c6 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ Special thanks to everyone who helped and contributed to this project! * [@jdebarochez](https://github.com/jdebarochez) * [@arisliang](https://github.com/arisliang) +* [@dotnetshadow](https://github.com/dotnetshadow) --- diff --git a/Startup.cs b/Startup.cs index d001f36..888679f 100644 --- a/Startup.cs +++ b/Startup.cs @@ -22,6 +22,9 @@ public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews(); + // Add AddRazorPages if the app uses Razor Pages. + services.AddRazorPages(); + // In production, the Vue files will be served from this directory services.AddSpaStaticFiles(configuration => { @@ -60,6 +63,9 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) new SpaOptions { SourcePath = "ClientApp" }, npmScript: (System.Diagnostics.Debugger.IsAttached) ? "serve" : null, regex: "Compiled successfully"); + + // Add MapRazorPages if the app uses Razor Pages. Since Endpoint Routing includes support for many frameworks, adding Razor Pages is now opt -in. + endpoints.MapRazorPages(); }); } }