C# 6 in razor view files, suggest install Microsoft.CodeDom.Providers.DotNetCompilerPlatform

Answered

I was attempting to write C# 6 in my razor view and i got this tooltip:

 

I don't know if that's from visual studio or from resharper.

I really wish resharper would give me the lightbulb to

Install-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform

2 comments
Comment actions Permalink
Official comment

Hello Chris,

It goes from Visual Studio. Please select a project node in Solution Explorer | hit Alt+Enter to open Project's properties | Build | Advanced (a button at the bottom of the page) | General | Language Level.

Since it is not ReSharper inspection, there is no lightbulb.

Thanks!  

Comment actions Permalink

Visual Studio 2015 default is already C# 6.

This is a razor viewengine .cshtml file

To use C#6 in razor you must install the CodeDom package i listed http://stackoverflow.com/a/31548221/37055

0

Please sign in to leave a comment.