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

旧街凉风 提交于 2019-12-05 07:15:42

Add this to your project.json:

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

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

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

I believe they also changed the default in the latest version of the engine. so the element is actually not needed anymore if you upgrade tje kvm to the lastest version.

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

Upgrading can be done by running kvm upgrade at the command prompt.

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

HTH, Bart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!