无法从Asp.Net Core应用程序调用.Net核心类库中的我的类和方法

时间:2016-11-04 18:19:21

标签: asp.net-core asp.net-core-mvc .net-core

我之前在herestackoverflow for example this进行了Google搜索。 依赖关系是解决,而不是错误。但是当我想在类(在.Net类库中)调用我的方法而不在Intellisense中显示时。我不能调用名称空间引用。

我正在检查并将我的project.json与结果进行比较我的Google搜索并降级netstandard library to 1.4 and 1.3,仍然无法调用我的方法...卸载我的resharper无助,仍然收到错误。

我正在使用Vs.2015更新3。

.Netcore v.1.0.1

这是.Net核心类库中的project.json,名为Project" DataContextCore"

{
  "version": "1.0.0-1",

  "dependencies": {
    "NETStandard.Library": "1.5.0-rc2-24027"
  },

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

这是我在Asp.Net Core中的project.json

  "dependencies": {
   ....other package library
    "DataContextCore": {"target" : "project", "version" : "1.0.0-1"}
  },

有谁知道它为什么会发生。或者确实,asp.net核心直到现在仍然不稳定。 我对asp.net内核及其所有配置感到非常沮丧,看起来像傻瓜或asp.net核心不稳定..我希望微软的人能够回答这个问题。

1 个答案:

答案 0 :(得分:0)

我会删除过时的rc2引用,更新如下:

"NETStandard.Library": "1.6.0-*"

"netstandard1.6": {
        "imports": "dnxcore50"
    }
相关问题