castle-windsor Getting started with castle-windsor Installation


Castle Windsor is available via NuGet

  1. Use the "Manage NuGet Packages" and search for "castle windsor"

  2. Use Package Manager Console to execute:

    Install-Package Castle.Windsor

Now you can use it to handle dependencies in your project.

var container = new WindsorContainer(); // create instance of the container
container.Register(Component.For<IService>().ImplementedBy<Service>()); // register depndency
var service = container.Resolve<IService>(); // resolve with Resolve method

See official documentation for more details.

Castle.Windsor package depends on Castle.Core package and it will install it too