Apr 21, 2010 at 10:43 AM
Edited Apr 21, 2010 at 11:39 AM
I have upgraded my app to use Enterprise Library 5.0 / Unity 2.0 and a personally build Composite Application Library with References to the new Assemblies.
Now, when application starts, I'm getting an exception "The invoked member is not supported in a dynamic assembly." in class 'DirectoryModuleCatalog.Desktop' in method 'InnerLoad' - Line 60 = "loadedAssemblies.AddRange(assemblies)"
/// Drives the main logic of building the child domain and searching for the assemblies.
protected override void InnerLoad()
throw new InvalidOperationException(Resources.ModulePathCannotBeNullOrEmpty);
throw new InvalidOperationException(
string.Format(CultureInfo.CurrentCulture, Resources.DirectoryNotFound, this.ModulePath));
AppDomain childDomain = this.BuildChildDomain(AppDomain.CurrentDomain);
List<string> loadedAssemblies = new List<string>();
var assemblies = (
from Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()
where !(assembly is System.Reflection.Emit.AssemblyBuilder)
I also tried with an empty directory, but it gives me the same error.
My Solution is using VS2010 .Net4.0 ...
Any idea what's wrong ?
Update: I take the 'DirectoryLookupModularity'-Sample from the Quickstarts and there I have got the same exception after upgrading the solution from .net3.5 to .net4.0.
Update II: While deeper searching the KnowledgeBase I found, that there are two patched pre versions
- one prepared for unity2.0/entlib5.0
- one for usage with .net4 http://compositewpf.codeplex.com/wikipage?title=Migrating%20Prism%20v2.1%20to%20.Net%204.0%20RC&referringTitle=VS%202010%20and%20.Net%204.0
So now I will merge both and hope that goes right...