From 1dcfa6e7fd61ae8311ce432063543b213f9e19aa Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 31 Jan 2019 15:19:02 -0800 Subject: [PATCH] Use Razor Runtime Compilation in F# StarterWeb project Fixes https://github.com/aspnet/AspNetCore/issues/4320 --- .../Microsoft.DotNet.Web.ProjectTemplates.csproj | 3 ++- .../Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in | 1 + .../Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj b/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj index d707c7e533..75423fcdc0 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj +++ b/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj @@ -12,11 +12,11 @@ + MicrosoftAspNetCoreMvcRazorRuntimeCompilationPackageVersion=$(MicrosoftAspNetCoreMvcRazorRuntimeCompilationPackageVersion); MicrosoftEntityFrameworkCoreSqlitePackageVersion=$(MicrosoftEntityFrameworkCoreSqlitePackageVersion); MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion); MicrosoftEntityFrameworkCoreToolsPackageVersion=$(MicrosoftEntityFrameworkCoreToolsPackageVersion); MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreAppPackageVersion); - MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion); @@ -31,6 +31,7 @@ + diff --git a/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in b/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in index f157223e56..40c54ea3be 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in @@ -15,6 +15,7 @@ + diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs index 06112ad9c8..fec0a8daf5 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs @@ -21,7 +21,7 @@ type Startup private () = // This method gets called by the runtime. Use this method to add services to the container. member this.ConfigureServices(services: IServiceCollection) = // Add framework services. - services.AddMvc().AddNewtonsoftJson() |> ignore + services.AddMvc().AddNewtonsoftJson().AddRazorRuntimeCompilation() |> ignore // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) =