Skip to content

MVC F# project build with warning "FS0044: This construct is deprecated", should update the project template. #69113

Description

@jinzhao1127

REGRESSION INFO: Works well on 11.0 RC 1

INSTALL STEPS:

  1. Clean Win11 x64 25h2 ENU
  2. Install the .NET 11.0 RC 2 SDK: https://aka.ms/dotnet/11.0.1xx/daily/dotnet-sdk-win-x64.exe
  3. Add feed

Platform

  • Windows
  • macOS
  • Linux

Repro Steps

  1. Open a normal Command Prompt
  2. Create a MVC F# proejct and build it
    dotnet new mvc -lang F# -o MVCFS
    cd MVCFS
    dotnet build
    

Actual Result
There is a warning FS0044: This construct is deprecated
Image

Log:

 C:\Users\v-zhajin\MVCFS\Program.fs(29,14): warning FS0044: This construct is deprecated. 
Razor runtime compilation is obsolete and is not recommended for production scenarios. 
For production scenarios, use the default build time compilation. For development scenarios, use Hot Reload instead. 
For more information, visit https://aka.ms/aspnet/deprecate/003.

Note

  1. This issue related with Mark AddRazorRuntimeCompilation methods obsolete #68841 change
  2. The MVC FS template should update.
  3. This issue does not repro on MVC C# project

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templates

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions