RazorEngine templates in VS 2015 - The function "implicitly typed local variable" is not available in C # 2

I get the following error when opening a RazorEngine cshtml template file in a VS 2015 project.

The function 'implicitly entered local variable' is not available in C # 2. Please use language versions 3 or higher.

The template compiles correctly, only intellisense is broken.

The project is configured to use .net 4.5 when building. The application is not ASP.Net, but a desktop application.

Intellisense also did a great job with VS 2013. The problem appeared after updating to VS 2015.

Does anyone have a similar problem and could advise how to solve it?

+11
source share
2

intellisense, app.config. Visual Studio .

<system.web>
    <compilation debug="false" targetFramework="4.5.1" />
</system.web>
+3

, app.config (2019)

<startup>
   <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
0

Source: https://habr.com/ru/post/1015888/


All Articles