kth1068 / ossbuild

Automatically exported from code.google.com/p/ossbuild
Other
0 stars 0 forks source link

System.NotSupportedException during registering of managed types #156

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi!

Applying the patch of bugzilla bug #604810 
(https://bugzilla.gnome.org/show_bug.cgi?id=604810) I have achieved to use 
XmlSerializer and GStreamer inside my project without problems.

However, I still appreciate an issue about this code and may be somebody here 
could help to me.

Some exceptions (always the same) are launched during the loading of GStreamer 
binding assemblies:

"System.NotSupportedException: The invoked member is not supported in a dynamic 
assembly"

The exception seems to be thrown at the line:

if (asm.Location != String.Empty) {...

(I guess the call to "Location" member has the fault)

And finally, the (dynamic?) assembly ("asm" variable) that origins everything 
is:

{Microsoft.GeneratedCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null}

I know that all the exceptions thrown here are ignored by this code:

...
} catch (Exception) {
  /* Failure to load a referenced assembly is not an error */
}

But I would like to better understand the problem and till now I have not found 
anything out there. Some questions:

What is the assembly "Microsoft.GeneratedCode" and which is its relationship 
with the "XmlSerializer"? Is it a dynamic assembly? A dynamic assembly is the 
same than a "referenced assembly"? Which is its mission here?

Some help would be very appreciated. Thanks a lot in advance! :)

Domingo.

Original issue reported on code.google.com by dlo...@visual-tools.com on 27 Feb 2015 at 12:16