我有一个新的.NET Core 1.0项目,由于某些未知的原因,它在调试时已停止(或从未做过,我不记得)。
我在这里添加了StackTrace包:How can I get the line number and file name from an exception in net Core?
但没有成功。
我正在使用VS2015社区和那里的标准工具。
我project.json
文件中可能相关的代码段:
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true,
"define": [ "DEBUG", "TRACE" ]
},
"runtimes": {
"win10-x64": {}
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
更新
好的,如果你从一个新的核心Web应用程序开始,一切都按预期工作。
如果您随后更新了所有软件包,则在添加:
之前,它将无法构建"runtimes": {
"win10-x64": {},
"win81-x64": {},
"win8-x64": {},
"win7-x64": {},
"win10-x86": {},
"win81-x86": {},
"win8-x86": {},
"win7-x86": {}
},
到project.json
进行构建和启动。
通过这样做,我现在可以得到行号,但仍然没有破坏。我的新测试项目按预期工作。我必须经历并看到差异。