Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of errors when opening aspnet/SignalR #795

Closed
davidfowl opened this issue Mar 10, 2017 · 5 comments
Closed

Lots of errors when opening aspnet/SignalR #795

davidfowl opened this issue Mar 10, 2017 · 5 comments
Assignees

Comments

@davidfowl
Copy link
Member

I'm running on OSX.

I didn't want to open an uber issue but it seems like there are multiple things happening here. The repro steps are to clone https://github.com/aspnet/SignalR and run build.sh. After the build finishes, open vs code at the root (code .).

  1. I get warnings telling me there are unresolved dependencies even though restore ran.
  2. I get 100s of errors talking about ambiguous references. It seems as though the sample projects don't see the src projects within the same solution so packages are being resolved...

image

I'll try to pick it apart into specific issues but I was caught by surprise because I thought things would just work.

@davidfowl
Copy link
Member Author

@DustinCampbell am assuming nobody is looking into this issue. There's a fundamental problem with project references in msbuild within omnisharp. If nobody gets to this issue I'll try to take a look this weekend. I can't use VS code anymore on any project in ASP.NET because of it.

@DustinCampbell
Copy link
Contributor

Sorry @davidfowl. I forgot to post back here after trying to repro a few weeks ago. Interestingly, I can repro if I run ./build.sh but I can't repro if I just dotnet restore SignalR.sln with .NET Core SDK 1.0.1. I do get several messages about unresolved dependencies which I dismiss with ESC. However, I don't get any errors.

Here's what I did in the Terminal:

git clone https://github.com/aspnet/SignalR.git
cd SignalR/
dotnet restore SignalR.sln
code .

No errors anywhere. 😞

image

Hovering over the methods where your screenshot shows errors or pressing F12 on them shows that they're indeed binding properly.

I suspect this has to do with the fact that the SignalR is using .NET Core SDK 2.0.0-preview1-005418, which is beyond RTM. Today OmniSharp ships RTM versions of the various MSBuild SDKs and points to those at designtime. So, at designtime, an older version of, say, Microsoft.Net.Web.Sdk is being used than what ./build.sh just ran against. That's just a guess though. I haven't dug in deeply enough to know for sure.

@DustinCampbell
Copy link
Contributor

got a fix for the unresolved references warnings. It was an issue with version ranges. SignalR's build uses 2.0.0-* throughout.

@DustinCampbell
Copy link
Contributor

Nah, it wasn't about SDKs. Project references were getting added twice due to some code that got lost in a refactoring a few months ago: ef4b383.

I've got a fix that should make SignalR work nicely for you.

@DustinCampbell
Copy link
Contributor

If you don't want to wait for a C# for VS Code update (which'll be a little while yet), you can build the latest omnisharp-roslyn dev branch and set the following settings in VS Code:

  • "omnisharp.path" : "<path-to-the-net46-OmniSharp.exe>"
  • "omnisharp.useMono" : true

Build instructions are here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants