How to fix intellisense with referenced netstandard1.5 library projects in Visual Studio 2015?

感情迁移 提交于 2019-12-01 08:47:07

Resharper is the problem here not Visual Studio.

http://blog.jetbrains.com/dotnet/2016/05/27/resharper-ultimate-2016-2-eap-kicks-off/

Initial support of ASP.NET Core 1.0 RC2, including support for tag helpers in terms of code completion, navigation, search and refactorings. At this point, ASP.NET Core web applications are supported if they’re targeting .NET Framework but are not supported if they’re targeting .NET Core. We’re looking to improve this in subsequent builds.

So if you have a library targeting .netstandard1.5 Resharper will not correctly display intellisense information but the project will compile.

However if you add the .netcoreapp1.0 framework as an additional framework to the project.json file Resharper will work and you get full intellisense support.

 frameworks": {
    "netstandard1.5": {
      "imports": [ "dnxcore50", "portable-net45+win8" ],
      "dependencies": {
        "NETStandard.Library": "1.5.0-rc2-24027",

        "System.Security.Principal": "4.0.1-rc2-24027"
      }
    },
    ".netcoreapp1.0": {
      "imports": [ "dnxcore50", "portable-net45+win8" ]
    }
 },
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!