DotNetCore跨平(ping)臺~問題~NETCoreAPP, Version=v1.0' compatible with one of the target runtimes: 'win10-x64
新建(jian)console項目之后(hou),編譯程序出(chu)現以下錯誤(wu):
Can not find runtime target for framework '.NETCoreAPP, Version=v1.0' compatible with one of the target runtimes: 'win10-x64, win81-x64, win8-x64, win7-x64'. Possible causes:
The project has not been restored or restore failed -run 'dotnet restore'
The project does not list one of 'win10-x64, win81-x64, win7-x64' in the 'runtimes'
解決方案:
打(da)開(kai)project.json
將以下代(dai)碼添加到根節點(dian)
"runtimes": {
"win10-x64": {}
},
添加后的樣子如下:

以(yi)上問題就可(ke)以(yi)得到解決了,事實(shi)上就是告訴dotnet core 這個項(xiang)目要在64位的(de)windows上運行(xing)!