Excption thrown when Linq to SQL is used

Jun 19, 2008 at 11:35 PM
Hi there

We are using the latest drop released on June 10.

In our application, when Linq to SQL is used to access database records, exception "The invoked member is not supported in a dynamic assembly" occurs at function EnsureModulesDiscovered() defined in class DirectoryLookupModuleEnumerator. Specifically, an anonymously hosted DynamicMethods assembly of type "System.Reflection.Emit.AssemblyBuilder" is generated when Linq to SQL is used, and this type does not support Location property. So exception happens when the function is looping through the assemblies as below:

var assemblies = (
                        from Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()
                       // where !String.IsNullOrEmpty(assembly.Location)
                        select assembly.Location
                        );

Just wondering if anyone knows how to resolve this?

Thanks!
Summer
Jun 21, 2008 at 3:56 AM
Thanks Summer. We are looking into this ASAP.