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

前端 未结 1 461
无人及你
无人及你 2021-01-14 17:36

I have four library projects that are all targeting the netstandard1.5 framework. Some of them depend on the other and the intellisense is working fine under th

相关标签:
1条回答
  • 2021-01-14 18:15

    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" ]
        }
     },
    
    0 讨论(0)
提交回复
热议问题