Package management for .NET: Nu
Package management for .NET has long been an issue. I won’t rehash the story, but you can read about a lot of the problems here.
There has been several attempts to replicate the success of Gems in Ruby, but none has really taken hold. Dru Sellers & Rob Reynolds had decided to take a slightly different approach. Instead of trying to replicate Ruby’s gems, just use them.
That is how Nu was created (and I really want to know what that name was picked, I nearly titled this post Dr. No). Before you can use Nu, you need to install it, which means that you have to make the following one time steps:
- Install Ruby (you can also use Iron Ruby, but the Ruby installer is just sweet & painless).
- gem install nu
Once this is done, all you need to do to install a piece of software is just write:
- nu install rhino.mocks
- nu install nhibernate
And Nu will get the latest version (including resolving dependencies) and put them in your lib folder.
After executing the two commands above, I have the following contents in my lib directory.
- castle.core
- castle.dynamicproxy2
- log4net
- nhibernate
- rhino.mocks
I like it, it is going to make things so much simpler!
Comments
Great. MSIs should work that way too.
Ayende: Awesome find. Thanks for that.
Tobi: Sorry, no, MSIs are trying to solve an entirely different problem.
I can just hear the screams from sysadmins on any non-trivial network who're told they an now install software this way.
@Will: Possible sysadmin scenario:
1-Set up an internal gem server
2-Authorize QA to publish tested & approved Gems
3-Deploy Gems in production/staging with all dependencies solved.
I'm not sure if something like that could be achieved, but it would ease things a lot.
This is certainly kinda cool, but IMHO a package management would only be useful if it's part of the OS. This will probably never happen to Microsoft, but I wish, I could just do:
and it would just install .NET 4.0, log4net, Lucene.Net, Escent and whatever else is required.
Great and simple. The only small problem is the dependency on Ruby, but I can live with that. -I will check this out right away.
"it is going to make things so much simpler!"
Just a thought - it would also make things simpler if there weren't so many dependencies. Castle.X.dll, log4net, the fluent dlls, the linq dlls... I understand technically why we have all the dependencies, but it does create an unnecessarily large barrier to entry for the layman. For quite a while there, if you wanted to use Linq with nHibernate, you had to figure out just the right mixture of dlls. It's really the sort of thing ILMerge was invented for.
Ah, but ILMerge doesn't always end well. See this post today from Udi Dahan:
feedproxy.google.com/.../AYF4Qwl_AXs/
I love it :)
I think .NET developers, especially web developers should really take a look on Ruby on Rails. It is so much easier at RoR side...
I'd like to see someday integrated ActiveRecord for ASP.NET as we have it on for Rails. It could be Castle ActiveRecord, NH, whatever, the most important thing it should not required too much configuration as it requires at the moment.
Thanks,
Marek
@marek, I fail to see how Ruby is easier. It's a pain to get setup on a windows machine but maybe you are not on windows?
Is this all setup to get the latest trunk versions or the latest stable releases?
@Mikael
Windows - we dont need no stinkin Windows..
How about RavenDB as a nu package?
List of gems available: groups.google.com/.../current-packages
The origin of the name is in our FAQs. Something to do with Nubular (like tubular, but short): http://groups.google.com/group/nu-net/web/faqs
Join the mailing list if you are interested in setting up packages, etc:
http://groups.google.com/group/nu-net
You can also check out the CoApp project (coapp.org) that is building package management for Windows that supports native, .NET, java, and others.
I like the simplicity behind the way this works, and we're working on being able to consume gems from inside CoApp as well.
@Mikael
I'm on Windows, and it is still easier - especially when we are taliking about data access.
Regards,
Marek
I cant get this to work... I just get a .nu dir with a tiny file and nothing else. Cannot find out which packages are available for nu or gem
How do I update downloaded libs?
@Dennis: Check out the links from Rob as there's a page there with a list of the current packages.
I looked at a lot of alternatives (including CoApp) and they all try to re-invent the wheel. This one just builds on what's out there.
The one wrinkle is that we're pushing gems up to rubygems.org and there's some contention in the community around this. People feel rubygems is for "ruby" gems. Fair enough. There are works underway to get a gem server specifically for .NET. It's just a matter of getting the proper infrastructure in place so it supports the entire .NET community as that's no easy feat.
I will look tonight at building a RavenDB gem ;)
Thanks to Ayende for liking this approach. Between all the ones out there, this one has the least friction and most potential. Like I said in my post on the subject, .NET developers just need to install Ruby and get over it. It's a non-issue.
Never understood the name...I still have a domain hanging around called bin4net, since I was working on package management in my spare time, with code-based descriptor and download based on bittorrent, but frankly, hangin' yourself into gems is probably the most efficient option. Would just need a decent entry page such that people like Dennis (and probably me) know how to get the stuff.
@Dennis @Frank: Decent? http://groups.google.com/group/nu-net
google groups is anything but decent...
And just for good measure, I'll remind everyone that there's also OpenWrap, that looks more like bundler than gems.
Hi,
This is way too cool! This will make things much simpler when installing different components. Thanks for creating such a nice tool!
Ayende, I've created an add-in for Visual Studio to make it very easy to add references to gems. Check it out on Visual Studio Gallery.
visualstudiogallery.msdn.microsoft.com/.../ba0f...
Kiliman
Comment preview