Nordis
Nordis

Reputation: 743

VS Code, OmniSharp: Project has these unresolved references:

I'm trying out Asp.Net Core and MVC 6 running on Mac OS X. After I've updated and installed everything it seems to be working pretty good. I can run a website with 'dnx web' that's been generated by Yeoman.

OmniSharp starts correctly but displays this message,

[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Project /Users/myname/AspNetCoreProjects/test1/project.json has these unresolved references: Microsoft.AspNet.Diagnostics, Microsoft.AspNet.IISPlatformHandler, Microsoft.AspNet.Mvc, Microsoft.AspNet.Mvc.TagHelpers, Microsoft.AspNet.Server.Kestrel, Microsoft.AspNet.StaticFiles, Microsoft.AspNet.Tooling.Razor, Microsoft.Extensions.Configuration.FileProviderExtensions, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.Logging, Microsoft.Extensions.Logging.Console, Microsoft.Extensions.Logging.Debug

I've tried to run 'dnu restore' several times. And it seems to succeed. It writes a lock file and so on. But for some reason OmniSharp / VS Code doesn't seem to find any references (except my own classes) at all.

It feels like I'm having the same problem described here, http://tech.genericwhite.com/visual-studio-2015-net-5-rc1-dnu-restore-asp-dot-net-missing

But that didn't work for me.

Any idea is very helpful!

Upvotes: 1

Views: 254

Answers (1)

eestein
eestein

Reputation: 5114

To start, install the runtime:

//to install coreclr
dnvm install latest -r coreclr -a coreclr-latest
//to install the clr
dnvm install latest -a mono-latest    

dnvm alias default [coreclr-latest | mono-latest] //depends on what you installed
dnvm use default

Let me know the output of ls -l ~/.dnx/runtimes/dnx-{your_coreclr_version}/bin | grep dn once you've ran those commands.

This is what your runtimes folder should look like:

enter image description here

I'm also writing a 5 five part tutorial on how to use ASP.NET Core along with with JSPM, TypeScript, etc as the frontend. If you don't care much for that you can take a look at the backend part (part 3) here:

http://ahoycoders.com/2016/03/29/jspm-with-systemjs-es6-angularjs-typescript-and-asp-net-core-part-3-backend/

This part focuses on installing and running ASP.NET Core on MacOS.

Let me know how it goes :)

EDIT: One thing I forgot to mention, before running dnu restore again remove "dnx451": {}, from your project.json

EDIT2: Make sure you install the coreclr option. From your post it seems you want to use ASP.NET Core

Upvotes: 0

Related Questions