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,如需转载请自行联系原博主。

目录
相关文章
|
11月前
|
API
SAP UI5 里一个功能的 compatibility version 是什么含义?
SAP UI5 里一个功能的 compatibility version 是什么含义?
运行QtDesigner.exe报错:it could not find or load the Qt platform plugin “windows“
运行QtDesigner.exe报错:it could not find or load the Qt platform plugin “windows“
运行QtDesigner.exe报错:it could not find or load the Qt platform plugin “windows“
|
Java
全网首发:There is an incompatible JNA native library installed on this system/6.1.2/4.0.1
全网首发:There is an incompatible JNA native library installed on this system/6.1.2/4.0.1
242 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)
773 0
|
.NET API C#
艾伟_转载:Windows Mobile开发,Native C++ PK .NET Compact Framework
缘由 经常听到一些刚刚接触Windows Embedded CE和Windows Mobile开发的人会提出一些疑问。进行Windows Mobile开发,到底使用什么语言呢?C++还是C#?Java行不行?下面就我自己的想法讲述一下Native C++ 和 .NET Compact Framework的异同和选择。
1366 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.
2547 0