NullReferenceException in gacutil install (mono)

时间:2018-06-19 11:17:22

标签: mono nullreferenceexception gac

I build a strongly named assembly with mono on linux:

mono --version  
Mono JIT compiler version 5.8.0.108 (tarball Fri Jan 19 18:15:21 UTC 2018)

lsb_release -a  
No LSB modules are available.  
Distributor ID: Ubuntu  
Description:    Ubuntu 16.04 LTS

xbuild /t:Build /p:Platform=x64 /p:Configuration=Release /p:CodesignKey=mylib.key MyProject.csproj

I have set MONO_PATH to /usr/lib

when I do gacutil -i, I get a nullreference exception :

System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.Security.StrongName.Verify (System.IO.Stream stream) [0x00009] in <d0ba90244dcf425b8db8f0aeeb7f1f15>:0
  at Mono.Security.StrongName.Verify (System.String fileName) [0x00009] in <d0ba90244dcf425b8db8f0aeeb7f1f15>:0
  at Mono.Tools.Driver.VerifyStrongName (IKVM.Reflection.AssemblyName an, System.String assemblyFile) [0x00048] in <d3d97c25425f448ba3689acf74171244>:0
  at Mono.Tools.Driver.Install (System.Boolean check_refs, System.String name, System.String package, System.String gacdir, System.String link_gacdir, System.String libdir, System.String link_libdir) [0x00059] in <d3d97c25425f448ba3689acf74171244>:0
  at Mono.Tools.Driver.Main (System.String[] args) [0x00394] in <d3d97c25425f448ba3689acf74171244>:0

I followed instructions from here to build and install my application in the GAC.

What goes wrong here?

0 个答案:

没有答案