Protocol buffer deserialization and a dynamically loaded DLL in Compact Framework

Posted by cloudraven on Stack Overflow See other posts from Stack Overflow or by cloudraven
Published on 2010-04-24T21:16:05Z Indexed on 2010/04/24 21:23 UTC
Read the original article Hit count: 245

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.

© Stack Overflow or respective owner

Related posts about protocol-buffers

Related posts about protobuf-net