Enabling C # 6 in ASP.VNext Projects in Visual Studio CTP2

I installed Visual Studio CTP2 and created a new ASP.Net Vext project. When I tried to use the features of C # 6.0, it did not work. I even tried stpes at the following link.

No C # 6.0 in Visual Studio 2015 CTP?

But even after that, I was not able to use C # 6 in VNext projects. Please, help.

+6
source share
2 answers

Add this to your project. json:

"compilationOptions": {"languageVersion": "experimental"}

+6
source

Do not add the net451 object. Use this inside the project.json file:

{ "compilationOptions": { "languageVersion": "experimental"}, "dependencies": { }, "commands": { } } 

I believe that they also changed the default value in the latest version of the engine. therefore, the item is no longer needed if you upgrade tje kvm to the latest version.

see https://github.com/aspnet/KRuntime/pull/512

Upgrade can be done by updating kvm at the command line.

see https://github.com/aspnet/Home/wiki/version-manager

NTN, Bart

+2
source

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


All Articles