Fix “The invoked member is not supported in a dynamic assembly.” Error in Tracing and Caching Provider Wrappers for Entity Framework

JIN Weijie
JIN Weijie
Published in
1 min readJul 11, 2013

When using Tracing and Caching Provider Wrappers for Entity Framework in ASP.Net MVC project, you may encounter the following error:

The invoked member is not supported in a dynamic assembly.

This error is caused by GetManifestResourceStream method in Assembly does not support dynamic assembly. To fix this error, go to line 184 @ EFProviderWrapperToolkit\EntityConnectionWrapperUtils.cs, change the following code:

foreach (Assembly asm in assembliesToConsider.Where(asm => !IsEcmaAssembly(asm) && !IsSystemAssembly(asm)))

To:

foreach (Assembly asm in assembliesToConsider.Where(asm => !IsEcmaAssembly(asm) && !IsSystemAssembly(asm) && !asm.IsDynamic))

Hope it helps.

--

--

JIN Weijie
JIN Weijie

Maximizing Quality of Life, Being Earth Friendly.