aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Referencing a compiled assembly from core solution breaks intellisense #875

Open BoasE opened 7 years ago

BoasE commented 7 years ago

I create core project with output for .net core and .net 46 then i refernce the .net 4.6. output as file reference in a 4.6 project.

the intellisense is broken, but the project compiles and executes, also the class from the core project is working. image

details see: http://stackoverflow.com/questions/40736040/vs2015-ide-intellisense-bug-when-reference-core-lib-from-a-net-4-6-console-app?noredirect=1#comment68697937_40736040

maybe it is related to: https://github.com/aspnet/Tooling/issues/874

my project.jsonm looks like this:

{
  "version": "1.0.0-*",

  "dependencies": {
    "NETStandard.Library": "1.6.0"
  },

  "frameworks": {

    "dnx46": {
      "imports": "dnx46"
    },
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }
}
davidfowl commented 7 years ago

Can you make a project and push it to github? Also that looks like you are using resharper, did you try updating it (if you are using it)?

BoasE commented 7 years ago

your right i'm using resharper. i tried to upload the project with a zip. it is quite empty, but it doesn't accept a my ip here.

i'll create a repo

BoasE commented 7 years ago

see: https://github.com/Gentlehag/CoreRef_bug_example

davidfowl commented 7 years ago

A few questions:

BoasE commented 7 years ago

what would be more appropriate? dotnet461 ? can you psot an example?

I Compile the class core libary and then open the file in the console application

davidfowl commented 7 years ago

what would be more appropriate? dotnet461 ? can you psot an example?

net461. Here's an example of a class lib that targets netstandard1.1 and net451 https://github.com/aspnet/SignalR/blob/59bd827458b8c032ff31bf30b704b71b654488e3/src/Microsoft.AspNetCore.SignalR/project.json#L36-L39.

I Compile the class core libary and then open the file in the console application

Your solution only has a single project. Can you add both? I'd like to see how are adding the reference.