Archive for the ‘NuPack’ Category

Using Powershell to make your NuPack Packages – more Awesome

Yeah.. Its a cheesy title but what can I say. You can file this under “why nupack is not just for open source”.  We are using Nupack to distributed dependencies libraries and for the UI Framework where I work (Dell).  My team is responsib…

Community Naming

Just a quick follow-up to my last posts about naming NuPack. Looks like the community is not content to sit back and let the project be labelled with a lame name. I’ve seen a couple of community inspired names created as new issues in the CodePlex is…

We’re Renaming NuPack

The NuPack project is undergoing a rename and we need your help! For details, read the announcement about the rename on the Outercurve Foundation’s blog. What is the new name? We don’t know. You tell us! The NuPack project team brainstormed a set…

NuPack Up For Grabs Items

In my last post, I described how we’re trying to improve and streamline contributor guidelines to make it easy for others to contribute to NuPack. Like all product cycles anywhere, we’re always running on tight time constraints. This helps us to …

Running Open Source In A Distributed World

When it comes to running an open source project, the book Producing Open Source Software – How to Run a Successful Free Software Project by Karl Fogel (free pdf available) is my bible (see my review and summary of the book). The book is based on Karl …

Light up your NuPacks with startup code and WebActivator

Wow, it’s hard to believe that it’s been less than a week since NuPack went public.  We were hoping to get noticed, but the attention we got was way beyond my wildest expectations!  The buzz on Twitter has just been phenomenal, and for th…

Using Solution Factory + NuPack to create Opinionated Visual Studio Solutions.

Using Solution Factory inside of NuPack opens up a great new world of creating Solution Level templates. Previously, I wrote a lot of code in Solution Factory that just kept running into edge cases working against the Visual Studio automation API ,DTE….

Introducing NuPack Package Manager

NuPack is a free open source developer focused package manager intent on simplifying the process of incorporating third party libraries into a .NET application during development.

After several months of work, the Outercurve Foundation (formerly CodePlex Foundation) today announced the acceptance of the NuPack project to the ASP.NET Open Source Gallery. This is another contribution to the foundation by the Web Platform and Tools (WPT) team at Microsoft.

Also be sure to read Scott Guthrie’s announcement post and Scott Hanselman’s NuPack walkthrough.

NuPack-LogoJust to warn you, the rest of this blog post is full of blah blah blah about NuPack so if you’re a person of action, feel free to go:

Now back to my blabbing. I have to tell you, I’m really excited to finally be able to talk about this in public as we’ve been incubating this for several months now. During that time, we collaborated with various influential members of the .NET open source community including the Nu team in order to gather feedback on delivering the right project.

What Does NuPack Solve?

The .NET open source community has churned out a huge catalog of useful libraries. But what has been lacking is a widely available easy to use manner of discovering and incorporating these libraries into a project.

Take ELMAH, for example. For the most part, this is a very simple library to use. Even so, it may take the following steps to get started:

  1. You first need to discover ELMAH somehow.
  2. The download page for ELMAH includes multiple zip files. You need to make sure you choose the correct one.
  3. After downloading the zip file, don’t forget to unblock it.
  4. If you’re really careful, you’ll verify the hash of the downloaded file against the hash provided by the download page.
  5. The package needs to be unzipped, typically into a lib folder within the solution.
  6. You’ll then add an assembly reference to the assembly from within the Visual Studio solution explorer.
  7. Finally, you need to figure out the correct configuration settings and apply them to the web.config file.

That’s a lot of steps for a simple library, and it doesn’t even take into account what you might do if the library itself depends on multiple other libraries.

NuPack automates all of these common and tedious tasks, allowing you to spend more time using the library than getting it set up in your project.

NuPack Guiding Principles

I remember several months ago, Hot on the heels of shipping ASP.NET MVC 2, I was in a meeting with Scott Guthrie (aka “The Gu”) reviewing plans for ASP.NET MVC 3 when he laid the gauntlet down and said it was time to ship a package manager for .NET developers. The truth was, it was long overdue.

I set about doing some research looking at existing package management systems on other platforms for inspiration such as Ruby Gems, Apt-Get, and Maven. Package Management is well trodden ground and we have a lot to learn from what’s come before.

After this research, I came up with a set of guiding principles for the design of NuPack that I felt specifically addressed the needs of .NET developers.

  1. Works with your source code. This is an important principle which serves to meet two goals: The changes that NuPack makes can be committed to source control and the changes that NuPack makes can be x-copy deployed. This allows you to install a set of packages and commit the changes so that when your co-worker gets latest, her development environment is in the same state as yours. This is why NuPack packages do not install assemblies into the GAC as that would make it difficult to meet these two goals. NuPack doesn’t touch anything outside of your solution folder. It doesn’t install programs onto your computer. It doesn’t install extensions into Visual studio. It leaves those tasks to other package managers such as the Visual Studio Extension manager and the Web Platform Installer.
  2. Works against a well known central feed. As part of this project, we plan to host a central feed that contains (or points to) NuPack packages. Package authors will be able to create an account and start adding packages to the feed. The NuPack client tools will know about this feed by default.
  3. No central approval process for adding packages. When you upload a package to the NuPack Package Gallery (which doesn’t exist yet), you won’t have to wait around for days or weeks waiting for someone to review it and approve it. Instead, we’ll rely on the community to moderate and police itself when it comes to the feed. This is in the spirit of how CodePlex.com and RubyGems.org work.
  4. Anyone can host a feed. While we will host a central feed, we wanted to make sure that anyone who wants to can also host a feed. I would imagine that some companies might want to host an internal feed of approved open source libraries, for example. Or you may want to host a feed containing your curated list of the best open source libraries. Who knows! The important part is that the NuPack tools are not hard-coded to a single feed but support pointing them to multiple feeds.
  5. Command Line and GUI based user interfaces. It was important to us to support the productivity of a command line based console interface. Thus NuPack ships with the PowerShell based Package Manager Console which I believe will appeal to power users. Likewise, NuPack also includes an easy to use GUI dialog for adding packages.

NuPack’s Primary Goal

In my mind, the primary goal of NuPack is to help foster a vibrant open source community on the .NET platform by providing a means for .NET developers to easily share and make use of open source libraries.

As an open source developer myself, this goal is something that is near and dear to my heart. It also reflects the evolution of open source in DevDiv (the division I work in) as this is a product that will ship with other Microsoft products, but also accepts contributions. Given the primary goal that I stated, it only makes sense that NuPack itself would be released as a truly open source product.

There’s one feature in particular I want to call out that’s particularly helpful to me as an open source developer. I run an open source blog engine called Subtext that makes use of around ten to fifteen other open source libraries. Before every release, I go through the painful process of looking at each of these libraries looking for new updates and incorporating them into our codebase.

With NuPack, this is one simple command: List-Package –updates. The dialog also displays which packages have updates available. Nice!

And keep in mind, while the focus is on open source, NuPack works just fine with any kind of package. So you can create a network share at work, put all your internal packages in there, and tell your co-workers to point NuPack to that directory. No need to set up a NuPack server.

Get Involved!

So in the fashion of all true open source projects, this is the part where I beg for your help. ;)

It is still early in the development cycle for NuPack. For example, the Add Package Dialog is really just a prototype intended to be rewritten from scratch. We kept it in the codebase so people can try out the user interface workflow and provide feedback.

We have yet to release our first official preview (though it’s coming soon). What we have today is closer in spirit to a nightly build (we’re working on getting a Continuous Integration (CI) server in place).

So go over to the NuPack website on CodePlex and check out our guide to contributing to NuPack. I’ve been working hard to try and get documentation in place, but I could sure use some help.

With your help, I hope that NuPack becomes a wildly successful example of how building products in collaboration with the open source community benefits our business and the community.

Introducing NuPack: the smart way to bring bits into your projects

I’m thrilled to announce that the secret project we’ve been working on for the last few months is no longer a secret!  It’s called NuPack, and you can download it from here.  Make sure you also read ScottGu’s post about it.

So what the heck is NuPack?  In short, it’s an Open Source package manager that lets you import libraries into your .NET applications with much less effort than what you’re used to.  Note that NuPack is not a Microsoft project, but an Outercurve Foundation project (previously Codeplex Foundation).  It has both Microsoft and non-Microsoft contributors, and is run as a true Open Source project.  See http://nupack.codeplex.com/ for more info on this.

 

What problem is NuPack solving exactly?

 

If you’re a .NET programmer, you’ve likely experienced the pain of getting a 3rd party library into your project.  It usually goes something like this:

  1. You know what it’s called, but you have no idea where it lives, so you search for it in your favorite engine.  You often find multiple pages that could legitimately be the want you want.
  2. You look around the main page for a link to the download page.
  3. Once on the download page, you’re often presented with way more choices than you’d like: several builds, for several platforms, …
  4. You download a zip file that you then unzip somewhere on your machine (after remembering to ‘unblock’ it in Windows!).
  5. You copy the relevant assemblies into some folder in your solution.
  6. In VS, you add a reference to the assemblies.
  7. In some cases, you need to make changes to your web.config file to properly enable the component.  This is quite non-trivial if you’re not familiar with it.

Needless to say, all of that is pretty painful and error prone.  Sure, once you’re familiar with a library, you’d probably just copy it from another project instead of getting it from the web, which makes things a bit easier.  But it’s still an overall very ad-hoc process.

And that doesn’t even cover the common case where a library has a dependency on some other libraries, which raises the complexity to the next level.

 

NuPack to the rescue!

 

With NuPack, you get a PowerShell window directly in Visual Studio.  You just type a simple command like ‘Add-Package CoolLibrary’, and it takes care of everything.  You can also right click on References and choose ‘Add Package Reference’ to do the same thing through a dialog.  It’s all very very easy, and it just works!

But instead of giving you all the details in writing, I put together a screen cast that shows NuPack in action!  It’s 14 minutes long, so a little bit on the long side, but it demonstrates using NuPack to install all kind of libraries into an MVC 3 app, so it’s pretty action pack.  If that doesn’t convince you of the awesomeness of NuPack, then I will have failed :)

Note: to watch it optimally, you can click on it a second time to view it directly in YouTube.  In there, change it to 720p and play it in full screen.

Another small note is that I made this video with a slightly older build, so you will see some small UI differences with the public bits.

 

NuPack in Action

 

I’ll be blogging some more about NuPack in the coming days, so stay tuned!

NuPack– .Net Package Management… and much, much, more

Yeah.. so all the Ruby and Java guys are saying.. Its about time .Net got a package management system. There were a few growing in the open source space, but none have really gained any traction.  Nu seemed to be getting going, I saw it earlier on at Pablo’s Fiesta here in Austin at the beginning of the year.  I would pull the source down and it seemed to be going, but slowly.  It has picked up some traction over the summer. But now that they guys have gotten together with Microsoft to make NuPack, I think we are going to see some interesting things happen in the .Net space.  Why is that?

 

Package management is a thankless job

First, let me say that writing a package management system is like being the guy who cleans out septic tanks…  No one wants to do it. But for the greater good of the community it has to be done.  Every Alt.Net conference I have been to has had a session about writing a package management system, and everytime we left saying we would do it, and it never got done or hardly past started. A few have stepped up to the plate, but I am so happy to see Microsoft putting a team of people out their to work on this full time on an open source solution.  Most open source projects in the .Net space have sparse commit logs.  I think you will see how much work has been invested into this solution when you look through the source code on the NuPack project website.

More than package management.

NuPack goes beyond package management and moving bits from a server to your workstation, it adds all the hooks needed to make hooking up new tooling and assemblies inside of Visual Studio a non event.  The biggest sell here is that instead of dealing with copying in boilerplate code, or adding nodes to configuration files, the packages can now just do that work.  I personally believe the reason Ruby and Rails has had such great velocity and acceleration is because of of the Ruby Gems system.  It is the super highway of reusability.  The .Net space has just dealt with horrible documentation and even worse XML configuration and it has been killing us.  I really think NuPack is a key piece to help change that story. I have worked on two projects when I was at Headspring to try to make it easier to replicate solutions.  They were Solution Factory and Flywheel.  Both were great ideas conceptually but in the end I found that I did not want to be the guy cleaning out the septic tank. It really took a team of people to pull this off and make it work frictionless(ly) in Visual Studio.

 

 

 

The future is bright

The future of NuPack is bright..This means that the sun has set for Solution Factory, while I am not going to shut the doors on the project, I have reworked the code of Solution Factory and its essence is now contained in a single class and packaged as a NuPack package.  I think the dramatic changes I was able to make with Solution Factory are a testament to how much of the problem space of Solution and Library reuse automation the NuPack project has taken on. I can see the remaining pieces of the Solution Factory project being totally subsumed by the NuPack project over time. From my point of view, this is a good thing. I would much rather collaborate on a solution than just being a lone committer.

Go Get NuPack Nupack-logo from Codeplex.com

 

 

 

I will post about Solution Factory and what it can do for projects like FubuMVC and Sharp Architecture.  I think when combine with NuPack the project can make it trivial to build your own Opinionated solution template.

Kick It on DotNetKicks.com