【发布时间】:2015-10-30 13:33:52
【问题描述】:
【问题讨论】:
标签: c# error-handling visual-studio-2015 settings asp.net-core-mvc
【问题讨论】:
标签: c# error-handling visual-studio-2015 settings asp.net-core-mvc
在您的project.json 中,您可以设置compiler options。它可能可以从那里进行配置。我目前在我的工作电脑上(没有 asp.net 5),所以我无法验证它。我建议您使用 Intellisense 来查看它是否可用。
{
"configurations": {
"Debug": {
"compilationOptions": {
"define": ["DEBUG", "TRACE"]
}
},
"Release": {
"compilationOptions": {
"define": ["RELEASE", "TRACE"],
"optimize": true
}
}
},
"compilationOptions": {
"define": ["SOMETHING"],
"allowUnsafe": true,
"warningsAsErrors" : true,
"languageVersion": "experimental"
}
}
目前编译选项似乎不支持它。如果你需要这个,我建议你在 github 上提出问题。
来源:https://github.com/aspnet/dnx/blob/dev/src/Microsoft.Dnx.Runtime/Compilation/CompilerOptions.cs
您可能想要扩展 this issue。
【讨论】: