Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use nuget package in ASP.NET vNext?

I am giving asp.net vNext a go and have created a new project. I wanted to pull in some dependencies and used NuGet as I usually would. I used it to pull in Require.js for example.

I now have a reference to this under ASP.NET 5.0 in the project references and I can see the path to where it is on my drive from the properties (myUserDrive/.kpm/packages/require... blah)

My question is, how do I use this? - historically it would have added the code to my web project.

like image 814
4imble Avatar asked Mar 17 '23 06:03

4imble


1 Answers

For clientside libraries you should now use Bower. The latest previews of Visual Studio 2015 have built in support for NodeJS' NPM packages and Bower packages. It's a bit more complicated but together with Grunt you can do some pretty cool stuff. Bower has a lot more libraries than NuGet and is more up to date.

For a good intro on all the new things in ASP.NET 5 I advise you to watch these videos on Channel 9: http://channel9.msdn.com/Series/Whats-New-with-ASPNET-5

The second video talks about NPM and Bower packages.

Bower: http://bower.io/ -> Search Packages

like image 163
ZippyV Avatar answered Mar 27 '23 22:03

ZippyV