0
所以我想建立一個自包含的.NetCore應用程序,只是一個簡單的默認你好世界之一。麻煩建設自包含.NetCore應用程序
我跟着Scott Hanselman's示例瞭解如何在Google搜索答案後創建應用程序。
所以我在我的project.json
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
//"type": "platform",
"version": "1.1.0"
}
},
"imports": "dnxcore50",
"runtimes": {
"win10-x64": {},
"osx.10.10-x64": {},
"ubuntu.14.04-x64": {}
}
}
}
}
正如你可以看到我已經註釋掉型線,並增加運行時間爲每個平臺的代碼。
但我不斷收到此錯誤:
Can not find runtime target for framework '.NETCoreApp,Version=v1.1' compatible with one of the targe
t runtimes: 'osx.10.10-x64'. Possible causes:
1. The project has not been restored or restore failed - run `dotnet restore`
2. The project does not list one of 'osx.10.10-x64' in the 'runtimes' section.
3. You may be trying to publish a library, which is not supported. Use `dotnet pack` to distribute li
braries.
現在我在Mac上運行這一點,但在Ubuntu上發生同樣的錯誤,但然後報告它涉及到Ubuntu的錯誤。
我的dotNet版本是1.0.0 = - preview2-1-003177
我有點卡住,似乎一切都指向它應該工作的事實,它可能是我俯瞰明顯的事情。
任何幫助表示讚賞。
真棒該訣竅部署(SCD):-) –