S
Samuel R. Neff
I'm looping through assemblies and checking CodeBase prior to
processing a given assembly. However, I occasionally get this error:
The invoked member is not supported in a dynamic module.
Which makes sense, but how can I check for this condition before
calling CodeBase (i.e., check for the error condition before
triggering the error). I didn't see any related properties.
Assembly.Location gave the same error.
Thanks,
Sam
foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
{
if (Path.GetDirectoryName(asm.CodeBase) != localDirectoryName)
{
continue;
}
foreach (Type t in asm.GetExportedTypes())
{
...
}
}
processing a given assembly. However, I occasionally get this error:
The invoked member is not supported in a dynamic module.
Which makes sense, but how can I check for this condition before
calling CodeBase (i.e., check for the error condition before
triggering the error). I didn't see any related properties.
Assembly.Location gave the same error.
Thanks,
Sam
foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
{
if (Path.GetDirectoryName(asm.CodeBase) != localDirectoryName)
{
continue;
}
foreach (Type t in asm.GetExportedTypes())
{
...
}
}