How to install Castle Windsor IOC?

I am currently reading Sanderson's Pro ASP.NET MVC Framework. In the book, he recommends setting up IoC using Castle Windsor, and he indicates that the download will automatically install it and register the Castle DLL in the GAC. So, at this point (5/4/2010), the Castle project no longer has a downloadable installer that installs this. It is all broken up into separate subprojects with unprocessed files contained in ZIP folders. Unfortunately, there is no installation documentation that I can find on how to configure it. Being the noob that I am, I am stuck and now have to ask No. 1, where should the windsor on my hard drive hang? # 2 how can I manually register dlls correctly? And, No. 3, should I be angry with the project maintainers for their oversight?

Here's the link: http://www.castleproject.org/castle/download.html

+4
source share
2 answers

Sanderson’s book is somewhat outdated about Castle - ASP.NET MVC Integration.

There is no oversight, the castle development team decided that the project is becoming too large for effective management, so they split it . So, now each of these new projects comes as a separate package, which includes the necessary DLLs.

No installation, because it really is not necessary. As with most .Net open source libraries (e.g. NHibernate, log4net, Rhino.Mocks, Moq and others), you get a DLL, put it in some directory in your project (most people call it lib or Dependencies ) , then from your project you add a link to the DLLs in this directory. No need to mess around with the GAC at all.

You also need to get MvcContrib (the one that says MVCContrib.Extras.release.zip ) that implements Windsor - ASP.NET MVC integration (a factory controller and extensions for registering controllers, among other things). In fact, MvcContrib already includes Windsor, so that's all you really need.

+6
source

You are looking for the Castle MicroKernel / Windsor project: http://www.castleproject.org/container/index.html

Here is a link to the Getting Started page: http://www.castleproject.org/container/gettingstarted/part1/index.html

Once you have downloaded the ZIP file, extract it to a known location on your hard drive (this is normal inside the Visual Studio solution catalog).

Follow the Getting Started guide, it allows you to use which DLL to reference in your project and how to use it

Good luck

+1
source

Source: https://habr.com/ru/post/1308830/


All Articles