【发布时间】:2016-11-16 22:27:56
【问题描述】:
我刚刚安装了Visual Studio for MAC,并在底部窗口(应用程序输出)中按播放时创建了hello world控制台应用程序,我可以看到hello world。
但是,如何从命令/终端行执行该应用程序?
如果我尝试 ./myapp.dll,即使在 sudo su 之后,我也会被拒绝。
所以,不知道如何运行它
这是我的 json
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0"
}
}
}
},
"runtimes": {
"win10-x64": {},
"osx.10.10-x64": {}
}
}
更新
我已经运行了 dotnet restore 和 dotnetrun,首先我得到了这个错误: 找不到与以下目标运行时之一兼容的框架“.NETCoreApp,Version=v1.0”的运行时目标:“osx.10.12-x64”。可能的原因:
然后我像这样更改了我的 project.json:
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0"
}
}
}
},
"runtimes": {
"win10-x64": {},
"osx.10.12-x64": {}
}
}
然后我收到数百个这样的错误: System.Threading.Tasks 4.0.11 为 .NETCoreApp 上的 System.Threading.Tasks 提供了编译时参考程序集,Version=v1.0,但没有与 osx.10.12-x64 兼容的运行时程序集。 System.Threading.Timer 4.0.1 为 .NETCoreApp 上的 System.Threading.Timer 提供了编译时参考程序集,Version=v1.0,但没有与 osx.10.12-x64 兼容的运行时程序集。
刚刚列出了几个J
我猜我的运行时对于 OSX 不正确,但我应该设置它吗?
【问题讨论】:
标签: c# macos asp.net-core .net-core