msgpack-cli icon indicating copy to clipboard operation
msgpack-cli copied to clipboard

mpu.exe(1.0.0) not working in the Mac environment

Open hiyorin opened this issue 5 years ago • 2 comments

Mac environment: OSX High Serria (10.13.6)

mono version:

mono --version
Mono JIT compiler version 5.18.0.216 (2018-08/f0e466618d1 Fri Nov 30 20:17:18 EST 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com

mpu version:

mono mpu.exe
MessagePack for Unity Utility ver. 1.0.0
  Copyright © FUJIWARA, Yusuke 2010-2017

execute command:

mpu.exe -s -o OutDir Data.cs
System.Exception: Compiler failed to produce the assembly. Output: ''
  at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x002d1] in <4605a50878ff458c98a8b66722729be6>:0
  at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x0003a] in <4605a50878ff458c98a8b66722729be6>:0
  at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00006] in <4605a50878ff458c98a8b66722729be6>:0
  at mpu.SerializerTargetCompiler.CompileSourceFiles (System.Collections.Generic.IEnumerable`1[T] sourceFilePathes, System.Collections.Generic.IEnumerable`1[T] referenceAssemblies, System.IO.TextWriter outputWriter, mpu.ColorizedTextWriter errorWriter) [0x000b1] in <be08559612f34dafb4556b44679e5666>:0
  at mpu.SerializerTargetCompiler.CompileTargetTypeAssembly (System.Collections.Generic.IEnumerable`1[T] sourceFilePathes, System.Collections.Generic.IEnumerable`1[T] referenceAssemblies) [0x00054] in <be08559612f34dafb4556b44679e5666>:0
  at mpu.Program.GenerateSerializers (System.Collections.Generic.IList`1[T] sourceFilePathes, System.String[] referenceAssemblies, System.Boolean sourceFileIsAssembly, System.String includingPattern, System.String excludingPattern, System.Boolean treatWarningsAsErrors, System.Int32 warningLevel, System.Boolean admitNonPublicTypes, MsgPack.Serialization.SerializerCodeGenerationConfiguration configuration) [0x00037] in <be08559612f34dafb4556b44679e5666>:0
  at mpu.Program.Execute (System.Collections.Generic.IEnumerable`1[T] args) [0x003f6] in <be08559612f34dafb4556b44679e5666>:0
  at mpu.Program.Main (System.String[] args) [0x00000] in <be08559612f34dafb4556b44679e5666>:0

Data.cs:

public class Data
{
    public int Integer { get; set; }
    public float Float { get; set; }
}

Am I making a mistake? I want to working on Mac environment. Thank you.

hiyorin avatar Dec 02 '18 03:12 hiyorin

it looks like #80. mpu.exe failed to build your source code to inspect target type metadata.

Try following:

  1. Build your *.cs file with mono.
  2. Specify the built dll file and -a option.

yfakariya avatar Dec 02 '18 10:12 yfakariya

I solved it. Thank you!

hiyorin avatar Dec 03 '18 12:12 hiyorin