Welcome Guest, you are in: Login

Castle Project


Navigation (Windsor)

Search the wiki


This documentation is a work in progress.

Let us know if some information is not clear, inaccurate or missing. Also feel free to update the wiki yourself.

Windsor Tutorial - Part One - Getting Windsor

Modified on 2011/12/30 01:54 by Krzysztof Ko┼║mic Categorized as Samples, toBeSeen, tutorial, updated_for_windsor_3


From a development environment perspective Windsor is just a library. There's no need to "install" anything and no additional tooling is required. So to get started, you need to get Windsor onto your machine.

Getting Windsor

There are a few ways you can get Windsor. You can use either a package manager like OpenWrap, you can use Microsoft Nuget or do it the old way - by getting the file manually. The simplest way (and likely the most popular these days) is to use Nuget and that's what we'll do.

Creating Visual Studio solution

  • Start your Visual Studio.
  • Go to File->New-->Project...
  • Select ASP.NET MVC 3 Web Application
  • Pick Internet Application template and Razor view engine
  • If you want to, you can select "Create a unit test project". We won't, we'll add one manually at a later point

This should create the default bare-bone ASP.NET MVC 3 project for you. Now let's add Windsor to it.

Adding Windsor

Getting Nuget

This part requires Nuget Package Manager. If you don't have it yet, you can get it from http://nuget.org or directly in your Visual Studio, by going to Tools-->Extension Manager... and searching for Nuget Package Manager

  • Open Package Manager Console (View-->Other Windows-->Package Manager Console)
  • After it has initialized type
    Install-Package Castle.Windsor

After a few seconds Nuget will pull Windsor and it's dependencies (Castle.Core).



Now you have added Windsor into your application and are ready to start taking advantage of it. If you've completed all the steps let's proceed to Part two and start writing some actual code.

ScrewTurn Wiki version Some of the icons created by FamFamFam.