Using MvcSiteMapProvider throuh NuPack

Edit on GitHub

NuPackProbably you have seen the buzz around NuPack, a package manager for .NET with thight integration in Visual Studio 2010. NuPack 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. If you download and install NuPack into Visual Studio, you can now reference MvcSiteMapProvider with a few simple clicks!

From within your ASP.NET MVC 2 project, right click the project file and use the new “Add Package Reference…” option.

Add package reference

Next, a nice dialog shows up where you can just pick a package and click “Install” to download it and add the necessary references to your project. The packages are retrieved from a central XML feed, but feel free to add a reference to a directory where your corporate packages are stored and install them through NuPack. Anyway: MvcSiteMapProvider. Just look for it in the list and click “Install”.

MvcSiteMapProvider in NuPack

Next, MvcSiteMapProvider will automatically be downloaded, added as an assembly reference, a default Mvc.sitemap file is added to your project and all configuration in Web.config takes place without having to do anything! I’m sold :-)

Disclaimer for some: I’m not saying NuPack is the best package manager out there nor that it is the best original idea ever invented. I do believe that the tight integration in VS2010 will make NuPack a good friend during development: the process of downloading and including third party components in your application becomes frictionless. That’s the aim for NuPack, and also the reason why I believe this tool matters and will matter a lot!

This is an imported post. It was imported from my old blog using an automated tool and may contain formatting errors and/or broken images.

Leave a Comment


4 responses

  1. Avatar for Matt Hidinger
    Matt Hidinger October 9th, 2010

    Hey Maarten,

    This looks great indeed. I have been using MvcSiteMapProvider since it was first brought onto codeplex, and have loved the new 2.0 features in some newer projects. This will make it even easier to put into my future work.

    Also, trying not to add fuel to the NuPack fire, but it's disappointing that we are forced to add a "disclaimer for some" as a preemptive defense against would-be vocal members of the community bringing the NuPack war here... Ah well


  2. Avatar for Fatal
    Fatal October 18th, 2010

    any news on a version that supports MVC3? i'm having all sorts of issues trying to shoehorn mvcsitemapprovider 2.1 (and even compiled from 2.2 branch) into my MVC3 beta project

    a couple of compilation errors i needed to fix:
    MvcSiteMapProviderViewEngine.CreatePartialView (and CreateView) needs to pass the controllerContext parameter into the WebFormView constructor

  3. Avatar for maartenba
    maartenba October 20th, 2010

    Have to work on that, it is planned.

  4. Avatar for Jhonny Alfaro
    Jhonny Alfaro January 28th, 2011

    Hello Maarten
    I installe MVCSiteMap version 2.3.0 using the NuPack, it worked great, but after install ASP.Net MVC 3 the following error appears 'MvcSiteMap' is not a member of 'System.Web.Mvc.HtmlHelper(Of Object)' do you have any clue of what could be happen?