0
我有一個示例應用程序(叉是:https://github.com/cpoDesign/Windows-appsample-trafficapp)如何解決運行osx.10.11-64爲UAP,版本= V10.0
當我運行: 以下命令:
bash-3.2$ dotnet restore
bash-3.2$ dotnet run
我收到以下錯誤
無法找到運行目標框架「UAP,版本= 10.0版」 與目標運行時的一個兼容:「osx.10.11-64」。可能的 原因: 1.項目尚未恢復或恢復失敗 - 運行 2.項目沒有在「運行時」部分列出'osx.10.11-x64'之一。 3.您可能正試圖發佈一個不受支持的庫。使用
dotnet pack
來分發庫。
這之後我已經更新我的項目提供OSX應將描述
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {},
"osx.10.11-x64":{}
}
}
提供我又跑我點net命令上面
運行 這一次,我有後得到
**bash-3.2$ dotnet restore**
log : Restoring packages for /Users/user/Desktop/code/trafficApp/Windows-appsample-trafficapp/TrafficApp/project.json...
log : Lock file has not changed. Skipping lock file write. Path: /Users/user/Desktop/code/trafficApp/Windows-appsample-trafficapp/TrafficAp
p/project.lock.json
log : /Users/user/Desktop/code/trafficApp/Windows-appsample-trafficapp/TrafficApp/project.json
log : Restore completed in 647ms.
**bash-3.2$ dotnet run**
Can not find runtime target for framework 'UAP,Version=v10.0' compatible with one of the target runtimes: 'osx.10.11-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.11-x64' in the 'runtimes' section.
3. You may be trying to publish a library, which is not supported. Use `dotnet pack` to distribute libraries.
我需要更新什麼?
我不明白,你爲什麼要在OSX上運行UAP/UWP(這是Windows特有的)應用程序?你爲什麼期望這個工作?出於某種原因,它被稱爲Universal * Windows *平臺。 – svick
@svick你是對的,並解釋一切 – cpoDesign