I was running into an issue when trying to precompile more then 20 types:
Object reference not set to an instance of an object
at ProtoBuf.Precompile.PreCompileContext+<>c__DisplayClassf.<Execute>b__a
(System.Object sender, IKVM.Reflection.ResolveEventArgs args) [0x00000] in
<filename unknown>:0
at IKVM.Reflection.Universe.Load (System.String refname,
IKVM.Reflection.Assembly requestingAssembly, Boolean throwOnError)
[0x00000] in <filename unknown>:0
at IKVM.Reflection.TypeNameParser.GetType (IKVM.Reflection.Universe
universe, IKVM.Reflection.Assembly context, Boolean throwOnError,
System.String originalName, Boolean resolve, Boolean ignoreCase) [0x00000]
in <filename unknown>:0
at IKVM.Reflection.TypeNameParser.Expand (IKVM.Reflection.Type type,
IKVM.Reflection.Assembly context, Boolean throwOnError, System.String
originalName, Boolean resolve, Boolean ignoreCase) [0x00000] in <filename
unknown>:0
at IKVM.Reflection.TypeNameParser.GetType (IKVM.Reflection.Universe
universe, IKVM.Reflection.Assembly context, Boolean throwOnError,
System.String originalName, Boolean resolve, Boolean ignoreCase) [0x00000]
in <filename unknown>:0
at IKVM.Reflection.Universe.GetType (IKVM.Reflection.Assembly context,
System.String assemblyQualifiedTypeName, Boolean throwOnError, Boolean
ignoreCase) [0x00000] in <filename unknown>:0
at IKVM.Reflection.Universe.GetType (System.String
assemblyQualifiedTypeName) [0x00000] in <filename unknown>:0
at ProtoBuf.Meta.RuntimeTypeModel.MapType (System.Type type, Boolean
demand) [0x00000] in <filename unknown>:0
at ProtoBuf.Meta.RuntimeTypeModel.Compile (ProtoBuf.Meta.CompilerOptions
options) [0x00000] in <filename unknown>:0
at ProtoBuf.Precompile.PreCompileContext.Execute () [0x00000] in
<filename unknown>:0
at ProtoBuf.Precompile.Program.Main (System.String[] args) [0x00000] in
<filename unknown>:0
I think its a simple null fix in the protobuf-net precompiler/program.cs so
the libkvm module can be found ok (when copied into the same directory the
precompiler is running at): Line 303:
if (nameOnly == "IKVM.Reflection" && *args.RequestingAssembly != null* &&
args.RequestingAssembly.FullName.StartsWith("protobuf-net")).
at least that seemed to work for me.
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.