NuGet Packages and Visual Studio Templates

Tuesday, February 28, 2012 by Morten Christensen

In our efforts to make developing Umbraco based sites and packages more painless we are releasing a collection of NuGet packages and Visual Studio templates for Umbraco 5. So if you are using Visual Studio to develop Umbraco based sites, your life just got a little easier ;)

NuGet Packages

I hope you already know about NuGet, but if you don't here is a short description "NuGet is a free, open source developer focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development", and I would encourage you to check out the project page on Codeplex.

We have created 11 NuGet packages that can be used for different purposes, which I will try to describe below



As you might have guessed the main package is Umbraco.5.0.310.0.nupkg, which is used to setup an Umbraco 5 MVC3 based site in Visual Studio. So to install it you simply go to the Package Manager Console and write:
"Install-Package Umbraco" and boom! you have an Umbraco solution ready to roll (to install the package you can also right click on references in your project and search for the package in the NuGet feed). After installing the package you just need to configure the project to use IIS Express (Visual Studio 2010 SP1 required) or setup a new site in IIS and you should be ready to go.

A majority of the other packages are dependencies to the main Umbraco NuGet package, but can also be used independently. Say you want to create a Hive provider you would simply type "Install-Package Umbraco.Hive" and all the dependencies needed to create a custom Hive provider will be added to your project. The last four packages listed above are intended for developers who want to create a custom Editor, ParameterEditor, PropertyEditor and/or Tree with corresponding naming.

We hope that you will find these packages useful in the development of Umbraco 5 based sites or packages. All feedback is welcome.

Visual Studio templates

In addition to the NuGet packages and to help getting started even easier we have also created a collection of extensions for Visual Studio 2010 in the form of project templates. You can find these templates by going to the Visual Studio Gallery or searching for them in the Online Gallery from within Visual Studio -> Go to the Tools menu, click Extension Manager and in the select the Online Gallery pane in the dialog. Search for Umbraco 5 and you should get these six results:


Umbraco 5 MVC3 Project Template - A project for creating an Umbraco 5 based ASP.NET MVC3 web application
Umbraco 5 Hive Provider - A project template for creating an advanced Hive provider with Entity, Revision and Schema Repositories
Umbraco 5 Simple Hive Provider - A project template for creating a simple Hive provider
Umbraco 5 Parameter Editor - A project template for creating a custom Parameter Editor
Umbraco 5 Property Editor - A project template for creating a custom Property Editor
Umbraco 5 Tree - A project template for creating a custom Tree

You can choose to install the templates that you would find usable be it one of them or all of them.
All of the project templates uses the NuGet packages for dependencies, so the Umbraco 5 MVC3 project template would give you pretty much the same result as installing the Umbraco NuGet package, but since its installed as an extension you will have it in the list of projects when you select New -> Project in Visual Studio and you would get a complete solution setup with a few clicks.
The rest of the templates contains a base structure for creating a simple or advanced Hive provider, Parameter- and Property Editor and finally a Tree with a Menu Item.

The two variations of a Hive provider contains the classes needed to get up and running, and with the dependencies and settings wired up to give an overview of how everything is tied together.
The ParameterEditor, PropertyEditor and Tree templates also contains the base classes for a simple version of an Editor or Tree, which should be easy to extend if needed.

We hope that you will find these project templates useful and that they'll help you get started with Umbraco 5.
Again, we would love to get your feedback on these templates. If you have suggestions for additional templates that you would like to see feel free to drop us a comment.

If you would like to bend any of these predefined templates to your needs you can easily create you own - fork the source on bitbucket:

Finally, if like the templates we have created please give them some stars on the Visual Studio Gallery

32 comment(s) for “NuGet Packages and Visual Studio Templates”

  1. Gravatar ImageLee Kelleher Says:

    Excellent work Morten! #h5yr

    Looking forward to using these NuGets & VS templates in all my future v5 package developments!

  2. Gravatar ImageKenneth Solberg Says:


  3. Gravatar ImageRichard Soeteman Says:

    Great work! #h5yr

  4. Gravatar ImageLee Says:

    Awesome :) Look forward to using these when 5.1 is released!

  5. Gravatar ImageEray Aydoğdu Says:

    that's a best news i've heard today!! i cannot wait 5.1!

  6. Gravatar ImageLennart Stoop Says:

    It feels so good to be a developer these days, great job Morten! :-)

  7. Gravatar ImageJustin Spradlin Says:

    Great job. Thank! This made my day!

  8. Gravatar ImageMarkus Says:

    God stuff! Great work!

  9. Gravatar Imagelynn eriksen Says:

    Found this yesterday. Works like a champ!

    When might we expect documentation on v5?

    I'm a newbee using 4.7 and got the Wrox book, but there is nothing on v5 in it.

  10. Gravatar ImageNiels Hartvig Says:

    @lynn: We'll be working on docs during of March, so expect new videos, getting started guides and some basic tutorial as well as in-depth architecture diagrams. In hindsight this should have been prioritized higher before we released v5.0 but we were blinded by excitement.

  11. Gravatar Imagelynn eriksen Says:

    @Neils - thanx! :)

  12. Gravatar ImageDoug Says:

    There is light shining through the clouds!!!! Thank you very much!!! I have been looking for this since I started working in v5.

  13. Gravatar ImageTad Van Fleet Says:

    I tried using the Umbraco 5 MVC3 Project Template. I believe its missing a file. When you try to run the project created you get HTTP Error 404.20 - Not Found. Once I added the global.asax file it would launch correctly.

  14. Gravatar ImageSimon Dingley Says:

    Great work all involved, I can't wait to finally get stuck into v5 and this is going to make the process a whole lot easier for people to get started!

  15. Gravatar ImageMorten Christensen Says:

    @Tad Sorry I haven't seen your comment until now. I'm aware of the issue, which has been corrected (think it was last week). So from now on the global.asax should stay part of the solution/website folder and not be deleted every time you start Visual Studio.

    Sorry for the inconvience this may have caused you.

  16. Gravatar ImageBiagio Says:

    Why Umbraco 5 MV3 template want to download IIS 7.5 Express? I already have IIS 7.5 on my pc.

  17. Gravatar Imagesalil junior Says:

    Biagio, do you want to work from the installed IIS 7.5? If so you must set up the MVC App to run on IIS 7.5.
    just google setting up MVC 3 project on IIS 7.5 and you'll get several tutorials. once set up then get nuget installed and download/install umbraco 5 from nuget.

    if you are using VS 2010 or VS 2010 Express (free) the i advice that you set your MVC project to run on the inbuilt IIS 7.5 Express (just right click on project and select 'run on iis express'). this is because with iis 7.5 express you will have the power of IIS 7.5 without the need to do any server administration which can be tasking and is an overkill at the development level...

    (my 2 cents)

  18. Gravatar Imagesalil junior Says:

    Biagio, guess the answer to your question is that IIS 7.5 Express is the lightweight version of IIS 7.5 introduced by Microsoft to make life easier for developers. It's an alternative to development server and is designed to integrate to your Visual Studio. It comes bundled with VS 2010 so you might be using and earlier version of VS.
    Just download it, it won't do any harm. as advised before, it's better to use IIS7.5 Express for development. But if for some reason you must use the installed IIS 7.5 then you got to set up your MVC project to run on it.

  19. Gravatar ImageJoe Bloke Says:

    Works great. One problem however:
    C:\Users\\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Morten Christensen\Umbraco 5 MVC3 Project Template\1.1.0\Packages is missing Umbraco.Hive.Providers.Membership. and this shows up an error each time after creating a new project.

  20. Gravatar ImageRune Lippert Says:

    For testing of Umbraco 5, and makeing a new web project. I've tryed to use this really nice Umbraco 5 template for visual studio. But after getting it setup with IIS 7.0. I get a build error when I try to build the project:
    D:\Local Sites\Umbraco 5 testsite\UmbracoWebApp1\Global.asax.cs(13,35): error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)

    any idea what I did wrong?

  21. Gravatar ImageRune Lippert Says:

    Please ignore my message, it turns out that updateing to VS2010 SP1, changed alot :)

  22. Gravatar ImageMatthew T Says:

    I get the same issue as Joe, although it does not seek to break anything:
    "Works great. One problem however:
    C:\Users\\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Morten Christensen\Umbraco 5 MVC3 Project Template\1.1.0\Packages is missing Umbraco.Hive.Providers.Membership. and this shows up an error each time after creating a new project."

  23. Gravatar ImageRobert J Says:

    I have a similar error as Joe and Matthew T, related to the Umbraco.Hive.Providers.Membership. package.

    Package installation error:

    Could not add all required packages to the project. The following packages failed to install from 'C:\Users\username\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Morten Christensen\Umbraco 5 MVC3 Project Template\1.1.0\Packages': Umbraco.Hive.Providers.Membership.

  24. Gravatar Imagesimon Says:

    Same as the 2 above posters

  25. Gravatar ImagePaul Says:

    Ditto for Umbraco.Hive.Providers.Membership. error.

  26. Gravatar ImageMokujin Says:

    Same error as the above folks. This is my first time looking at this product, does anyone know if it is still supported? Are issues like this typical? Our MS rep suggested this package to us and I am starting to wonder about the recommendation.

  27. Gravatar ImageQuangDV1 Says:

    Same error:
    Could not add all required packages to the project. The following packages failed to install from 'C:\Users\username\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Morten Christensen\Umbraco 5 MVC3 Project Template\1.1.0\Packages': Umbraco.Hive.Providers.Membership.

    Please help us! :)

  28. Gravatar ImageAnton Says:

    Same here for Umbraco.Hive.Providers.Membership. error.

  29. Gravatar ImageAllanM Says:

    Same error here: Umbraco.Hive.Providers.Membership.

  30. Gravatar ImageMorten Christensen Says:

    Hi All,

    Sorry about the late reply! Hadn't checked back on this post in a while.
    The error that a lot of you are mentioning is because the 5.1 release of the Visual Studio template had a reference to a nuget package (Umbraco.Hive.Providers.Membership. that is no longer used.

    The template has been updated, so if you already have it installed simply go to the Extension Manager and the Update pane to update the template to the latest version.



  31. Gravatar ImageMac Says:

    I've tried installing the umbraco 5 MVC template and it still has the nuget reference error.

  32. Gravatar ImageDoug Says:

    I've been trying to download the Umbraco 5 Visual Studio Template for an hour now, but it it nowhere to be found at Visual Studio Gallery. The URLs you provide are linking to a "Project not Published" page on the gallery.

    Are the templates deprecated or something?

    Any advise is appreciated.

Leave a comment