4

So I decided to take a look at this new Visual Studio 14 CTP. When I tried to add a package from Nuget library (Raven Database Server precisely) to my ASP.NET vNext Web Application, it felt like nothing really happened. Not a single piece of solution has changed, and the References remained the same.

I tried adding it manually using my "Project.json" file (as seen in this article), but IntelliSense didn't provide me with any fill. I actually tried it in a lot of different ways, with a whole lot of Nuget packages, with the same result.

Can anybody explain this situation?

1 Answer 1

7

ASP.NET vNext supports two targets: .NET 4.5 and CoreCLR. When targeting .NET 4.5 (net45) you can add any existing NuGet reference. When targeting CoreCLR (k10) you can only add NuGet references that support it; today, only some packages support that.

The package that you mention is only available for net45. To add a reference to it, add the package as a dependecy in the net45 section of project.json - just like autofac is added in this file

The entry should be: "RavenDB.Server":"2.5.2879"

PS: the manage NuGet references dialog is not functional for ASP.NET vNext projects in this version of VS

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you for your response. I tried adding just one line (thinking that all 9 dependencies will be solved automatically during the build process), and that resulted in one package appearing in references list, and it had a yellow warning sing in its name. So then I manually added all the dependencies to the list (System.Spatial, Microsoft.Data.Edm and so on), but all the needed packages (RavenDB.Client, .Server and .Embedded) remained "unidentified", yet all the dependencies were added to the solution without any problems. Is there any way I can ensure that the dependencies were solved?..
I tried this without success. I created an empty ASP.NET project (vs2014 CTP3) and added a reference to Microsoft.AspNet.Mvc. While typing that, intellisense showed various matches, and after saving the reference tree is updated to show the new reference. However, I tried to then add the MiniProfiler package; intellisense failed to show any matches, and clicking on "Search remote NuGet packages for 'MiniProfiler'" results in a "No new packages found online" status message. Completing it manually and then saving the file also doesn't seem to work, as the references aren't updated.
I am having issues with this as well. Tried to add nhibernate manually in the project.json file. All went well there but when I tried to compile it was not recognizing any of them. Hopefully this stuff will be resolved in the next VS release. All in all though, vnext is amazing! I cant wait to use it!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.