c# – 无法添加的引用.一个程序集必须有一个dll或exe扩展名才能被引用

我有简单的c#控制台应用程序(.NET 4.6),我想引用.NET核心类库:
{
  "version": "1.0.0-*","dependencies": {
    "NETStandard.Library": "1.6.0","Newtonsoft.Json": "9.0.1"
  },"frameworks": {
    "netstandard1.4": {
      "imports": "dnxcore50"
    }
  }
}

我得到以下例外:

解决方法

简单解决方案:

我的.NET控制台应用程序使用.NET 4.6,并应使用.NET Platform Standard 1.4引用核心类库.

Mapping the .NET Platform Standard to platforms说.NET 4.6与.NET Platform Standard 1.3兼容.

将Core Class Library的project.json更改为(摘录)

"frameworks": {
    "netstandard1.3": {
      "imports": "dnxcore50"
    }
  }

解决问题.

Here一个演示问题的兼容性表(.NET 4.6与.NET Platform Standard <= 1.3)兼容):

相关文章

原文地址:http://msdn.microsoft.com/en-us/magazine/cc163...
前言 随着近些年微服务的流行,有越来越多的开发者和团队所采...
最近因为比较忙,好久没有写博客了,这篇主要给大家分享一下...
在多核CPU在今天和不久的将来,计算机将拥有更多的内核,Mic...
c语言输入成绩怎么判断等级
字符型数据在内存中的存储形式是什么