Compilation Error of C# 7.1 code in Razor view with .NET Core 2.0

Solution In Progress - Updated -

Issue

When writing C# 7.1 code in Razor view page with rh-dotnet20 (.NET Core 2.0), got a compilation error when dotnet publish or dotnet run.

Environment

  • .NET Core 2.0 (rh-dotnet20 package)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content