Search code examples
c#visual-studio-2015resharperdnxdnx50

ReSharper "Cannot resolve symbol" between projects in brand-new dnx solution


My Setup:

  • VisualStudio 2015 Update1
  • ReSharper Ultimate 9.2
  • dnvm version 1.0.0-rc1-update2 clr x86

What I have done so far:

I 've created a brand-new solution with 2 projects:

  1. Visual C#/Web -> "Class Library (Package)
  2. Visual C#/Web -> "Console Application (Package)

and added a reference of the class library to the console application.

The project.json of the class library looks like this:

{
  "version": "1.0.0-*",
  "description": "DnxExampleClassLibrary Class Library",
  "authors": [ "John Doe" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "frameworks": {
    "net451": { },
    "dotnet5.4": {
      "dependencies": {
        "Microsoft.CSharp": "4.0.1-beta-23516",
        "System.Collections": "4.0.11-beta-23516",
        "System.Linq": "4.0.1-beta-23516",
        "System.Runtime": "4.0.21-beta-23516",
        "System.Threading": "4.0.11-beta-23516"
      }
    }
  }
}

The project.json of the console application looks like this:

{
  "version": "1.0.0-*",
  "description": "DnxExampleConsoleApp Console Application",
  "authors": [ "John Doe" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "compilationOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "DnxExampleClassLibrary": "1.0.0-*"
  },

  "commands": {
    "DnxExampleConsoleApp": "DnxExampleConsoleApp"
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": {
      "dependencies": {
        "Microsoft.CSharp": "4.0.1-beta-23516",
        "System.Collections": "4.0.11-beta-23516",
        "System.Console": "4.0.0-beta-23516",
        "System.Linq": "4.0.1-beta-23516",
        "System.Threading": "4.0.11-beta-23516"
      }
    }
  }
}

Now, when I try to create an instance of Class1 (that is in the class library project) inside my Main function, ReSharper tells me, that it cannot resolve the symbol.

enter image description here

The project compiles and when I suspend ReSharper, everything looks good.
I also tried to "ReSharper/Options -> Environment/General -> Clear Caches" but that didn't solve the problem either.

What do I do wrong? Please help.


Solution

  • Try installing ReSharper 10.1 EAP build, the following issues have been fixed there: one, two, three. So it should support the latest dnx version (ReSharper 9.2 can't support "1.0.0-rc1-update2" since R# 9.2 build was released about 9 months ago).