我有一个示例应用程序(fork是:https://github.com/cpoDesign/Windows-appsample-trafficapp)
当我跑步时: 以下命令:
bash-3.2$ dotnet restore
bash-3.2$ dotnet run
我收到以下错误
找不到框架的运行时目标' UAP,Version = v10.0' 与其中一个目标运行时兼容:< osx.10.11-x64'可能 原因: 1.项目尚未恢复或恢复失败 - 运行
dotnet restore
2.该项目没有列出其中一个osx.10.11-x64'在'运行时'部分。 3.您可能正在尝试发布不受支持的库。使用dotnet pack
分发库。
在此之后我更新了我的项目以提供osx desciption
{
"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":{}
}
}
提供运行时 我再次运行上面的点网命令
这次我有
**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.
我需要更新什么?
答案 0 :(得分:0)
通用应用平台/通用Windows平台是特定于Windows的。据我所知,没有办法在OSX上运行UAP / UWP应用程序。