简体   繁体   English

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

[英]Cannot Call My Class and method in .Net Core Class Library From Asp.Net Core app

I have googling before, in here and in stackoverflow for example this . 我之前在这里和在stackoverflow中都使用了谷歌搜索, 例如this for dependencies is solve, not getting error. 因为依赖关系可以解决,不会出错。 but when I want to call my method in class (on .Net Class Library) not showing in Intellisense.I can't call namespace reference. 但是当我想在我的类中调用我的方法时(.Net类库中)不在Intellisense中显示。我无法调用名称空间引用。

I was check and compare my project.json with result my googling and was downgrade netstandard library to 1.4 and 1.3 , still can't call my method...Uninstall my resharper not help to, still getting error. 我正在检查并将我的project.json与我的谷歌搜索结果进行比较,并将netstandard library to 1.4 and 1.3降级netstandard library to 1.4 and 1.3 ,仍然无法调用我的方法...卸载我的netstandard library to 1.4 and 1.3 ,仍然出现错误。

I am using Vs.2015 update 3. 我正在使用Vs.2015更新3。

.Netcore v.1.0.1 .Netcore v.1.0.1

here is my project.json in .Net Core Class Library ,name Project "DataContextCore" 这是.Net Core类库中的我的project.json ,名称为“ DataContextCore”

{
  "version": "1.0.0-1",

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

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

and here is my project.json in Asp.Net Core 这是我在Asp.Net Core中的project.json

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

does anyone know why it happened. 有谁知道为什么会这样。 or or indeed asp.net core is still not stable until now. 或什至实际上直到现在asp.net核心仍然不稳定。 I am very frustrated with asp.net cores and with all its configurations, look like fools or asp.net core is not stable..I hope microsoft guys can answer this. 我对asp.net核心及其所有配置感到非常沮丧,看起来像傻瓜或asp.net核心都不是稳定的。我希望Microsoft可以回答这个问题。

I would remove that rc2 reference that is outdated, update it like this: 我将删除过时的rc2参考,像这样更新它:

"NETStandard.Library": "1.6.0-*"

"netstandard1.6": {
        "imports": "dnxcore50"
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM