DotNetCore跨平台~问题~NETCoreAPP, Version=v1.0' compatible with one of the target runtimes: 'win10-x64

简介:

新建console项目之后,编译程序出现以下错误:

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'

解决方案:

打开project.json

将以下代码添加到根节点

  "runtimes": {
    "win10-x64": {}
  },

添加后的样子如下:

以上问题就可以得到解决了,事实上就是告诉dotnet core 这个项目要在64位的windows上运行!

本文转自博客园张占岭(仓储大叔的博客,原文链接:DotNetCore跨平台~问题~NETCoreAPP, Version=v1.0' compatible with one of the target runtimes: 'win10-x64,如需转载请自行联系原博主。

目录
相关文章
|
17天前
|
Linux
【linux】报错pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: ‘0.23ubuntu1’
【linux】报错pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: ‘0.23ubuntu1’
|
Java iOS开发
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
93 0
|
Java
编译OpenJDK8:[HotspotWrapper.gmk:45:/cygdrive/e/hub/openjdk/jdk8u/build/windows-x86_64-normal-server-
编译OpenJDK8:[HotspotWrapper.gmk:45:/cygdrive/e/hub/openjdk/jdk8u/build/windows-x86_64-normal-server-
96 0
成功解决This DCH driver package is not compatible with the currently installed version of Windows. This
成功解决This DCH driver package is not compatible with the currently installed version of Windows. This
成功解决This DCH driver package is not compatible with the currently installed version of Windows. This
|
Python
Cannot mix incompatible Qt library (version 0x50907) with this library (version 0x50e02)
Cannot mix incompatible Qt library (version 0x50907) with this library (version 0x50e02)
648 0
|
开发工具
The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.1.3-rtm-32065'. ...
The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.
2519 0
|
C# 存储 Windows
c# 获取系统版本,获取net framework 版本(Environment 类)
原文:c# 获取系统版本,获取net framework 版本(Environment 类) 1.获取当前操作系统版本信息 使用Environment.OSVersion 属性 获取包含当前平台标识符和版本号的 OperatingSystem 对象。
2717 0