Castle Windsor 5.1.1 erroring after upgrading Castle-Core from 4.4.1 to 5.0.0 - Could not load PermissionUtil from Castle.Core

Viewed 462

I have recently used NuGet to upgrade Castle Core to 5.0.0 and Castle Windsor to 5.1.1 in my existing ASP.NET Web Project. Castle Windsor was working perfectly before the upgrade.

Now whenever I call:

...
 var container = new WindsorContainer();
...

I get the error:

...
    System.TypeLoadException
      HResult=0x80131522
      Message=Could not load type 'Castle.Core.Internal.PermissionUtil' from assembly 'Castle.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'.
      Source=Castle.Windsor
      StackTrace:
       at Castle.MicroKernel.DefaultKernel..ctor(IDependencyResolver resolver, IProxyFactory proxyFactory)
       at Castle.MicroKernel.DefaultKernel..ctor()
       at Castle.Windsor.WindsorContainer..ctor()
       at CastleTest2.Controllers.HomeController.Index() in C:\Users\jacki754\source\repos\CastleTest2\Controllers\HomeController.cs:line 14
       at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] 

       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
       at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
    ...

I can't find any specific documentation on these new versions, so does anyone know if there are any additional steps that need to be taken (e.g. in Web.Config) to set up Castle Windsor?

0 Answers
Related