Were having a problem with 3rd part assemblies that has embedded assemblies using ILMerge.
We have NHibernate 22.214.171.12400 that contains a embedded assembly 'Remotion.Data.Linq' embedded and internalized.We get a startup Exception from EPiServer.Plugin.AssemblyTypeInfo.GetTypes()
Failed to load some types from "NHibernate": Could not load file or assembly 'Remotion.Data.Linq, Version=126.96.36.199.....'
Is there a way to exclude PlugIn scanning of certain assemblies?
I am not sure if its possible in CMS 5. It is possible in CMS 6 through the EPiServerFramework.config.
As I remember the system tries to load and scan all assemblies in site bin folder, excluding assemblies that looks like "system" (Microsoft, .NET libraries, etc). I'm not sure if it is possible to exclude something else in bin folder.
Possible solution is to move assemblies that should not be scanned to some other folder under site root and configure probing path to that directory.
<configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="someFolderWithAssemblies"/> </assemblyBinding> </runtime></configuration>
The system should not scan assemblies in probing path automatically, but that assemblies can be found by the system to load by name.
You can find more details here: http://msdn.microsoft.com/en-us/library/823z9h8w(v=VS.100).aspx, http://msdn.microsoft.com/en-us/library/yx7xezcf(v=VS.100).aspx
Please let me know if it works for you.