1

I saw a question related to this on the full framework here. Since it seems to have stayed unresolved for quite a while and this is for the compact framework, I though it would be better to create a new question for it.

I want to deserialize types for which I am loading assemblies dynamically (with Assembly.LoadFrom) and I am getting a "Unable to identify known-type for ProtoIncludeAttribute" error.

In the related question I mentioned, it was hinted that hooking AppDomain.AssemblyResolve event would help solving the problem. It makes sense for the full framework, but that event is not available in the CF. I wonder if there is a way to do this with CF.

The structures I am using look a lot like this and all the classes required for deserialization are loaded from the same Assembly. If the assembly is referenced instead of dynamically loaded it works fine, but fails if done dynamically.

Community
  • 1
  • 1
cloudraven
  • 2,484
  • 1
  • 24
  • 49
  • CF, Assembly.LoadFrom, all types in the same assembly, something like the "this" link; OK - I'll take a look and see what I can find out. – Marc Gravell Apr 26 '10 at 04:23
  • CF is, as always, presenting some problems in this area. I /expect/ that the "v2" code will present some answers here, since the metadata layer talks `Type` from the outset (rather than having to deserialize the type names). I'll see if I can get something demonstrable on CF ASAP. – Marc Gravell Apr 27 '10 at 21:34
  • Thanks! I was also thinking that probably v2 will fix all these issues. I can't wait to try it. – cloudraven Apr 28 '10 at 05:18

0 Answers0