I have an application which is being developed in VS2010, and makes use of the Castle-Windsor IoC, through a configuration file.
One of the components I am registering, also developed in VS2010, references a .net 2.0 component (LeadTools), so recompiling the 2.0 project isn't an option. When the wrapping component's registration is done, a "ComponentActivatorException" is raised, which wraps a "System.TypeInitializationException", which in turn wraps a "System.IO.FileLoadException" with a message of "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information."
I have added the runtime declaration to the application's configuration file, as so:
<!-- useLegacyV2RuntimeActivationPolicy is needed for LEADTools-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v2.0.50727" />
</startup>
This works fine if the wrapping component isn't registered in Windsor, however, it does appear to disregard the directives otherwise.
Thanks!