【发布时间】:2017-02-27 16:17:44
【问题描述】:
所以我一直在 Visual Studio Code 中开发一个项目 C# 项目,并且需要使用调试功能。但是,当我运行调试器时,我收到以下消息:
--------------------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio
Code, Visual Studio or Visual Studio for Mac software to help you develop and
test your applications.
--------------------------------------------------------------------------------
The specified framework 'Microsoft.NETCore.App', version '1.0.1' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\dotnet\shared\Microsoft.NETCore.App
- The following versions are installed:
1.1.0
- Alternatively, install the framework version '1.0.1'.
The program 'c:\Projects\App1\bin\Debug\netcoreapp1.0\App1.dll' has exited with code -2147450749 (0x80008083).
我最初对该消息的理解是我需要更改 project.json 依赖文件,以便显示 Microsoft.NETCore.App 版本的行从 1.0.1 更新为 1.1.0。然而,这似乎没有任何区别。我试过用谷歌搜索这条消息,但并没有真正理解很多讨论。有人可以为我指出正确的方向吗?
如果我可以提供任何对您有帮助的信息,请告诉我。
目前我的project.json是这样的:
{
"version": "1.1.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"testRunner": "xunit",
"dependencies": {
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029"
},
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
//"type": "platform", //remove this line if trying to build a native app via runtime section
"version": "1.1.0"
}
},
"imports": "dnxcore50"
}
},
"runtimes": { //this section allows you to specify runtime for native build output, note these will not generate unless type:"platform" is commented out in dependancies
"win10-x64": {},
"osx.10.11-x64": {}
}
}
【问题讨论】:
标签: c# visual-studio-code