When upgrading I had a lot of dependent modules that needed to be upgraded, to make the site build. I also changed the target framework to .NET 4.0. Finding the problem after all these changes was therefore quite complex.

Upgrade scenario: 

  • EPiServer assemblies from CMS 5 to CMS 6 R2
  • Pagetype builder (PTB) from 1.1.0.0 to 2.0.0.0
  • Castle.Core 1.1.0.0 to 3.0.0.0

Solution:

  • Remove the old Castle.DynamicProxy2.dll from \bin. (It was used by the old PTB version.)

LoaderException

The real error was hidden by the settings inside the server.serviceModel section in web.config. The EPiServer RemoteEventServiceEndPoint was set up using a udp protocol. Changing this to use a tcp protocol, I got the real error message:

"Unable to load one or more of the requested types. The following information may be a subset of the Type/LoaderException information present - inspect with debugger for complete view.
Check assemblies [Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc] and/or types"

And that's how I figured it out.