[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

C-sharp question: Failure adding assembly ... Strong name cannot be verified for delay-signed assembly

Dear all, 

I'm currently packaging a new version of gdcm [1], it uses swig 3.0 to
create the c-sharp bindings and all compiles fine. 

When packaging I get 
   debian/libgdcm-cil/usr/lib/cli/gdcm-sharp-2.6/gdcm- sharp.dll 
     has no valid signature, ignoring

Then, when I try to install the *-cli packages the post-install script
fails with 

* Installing 1 assembly from libgdcm-cil into Mono
E: installing Assembly /usr/lib/cli/gdcm-sharp-2.6/gdcm-sharp.dll   
E: Installation of libgdcm-cil with 
    /usr/share/cli-common/runtimes.d/mono failed

After some digging I think now that the actual command that is executed

  gacutil -i /usr/lib/cli/gdcm-sharp-2.6/gdcm-sharp.dll

and it fails with

  Failure adding assembly /usr/lib/cli/gdcm-sharp-2.6/gdcm-sharp.dll to
  the cache: Strong name cannot be verified for delay-signed assembly

I notes that in the old version of libgdcm-cil (2.4) there is a file
clilibs in the deb://DEBIAN/ directory that is missing in my new
package. I assume that this is some kind of signature. The old package
also has the same postinst script that installs the package in the gac.

The old package used mummy/activiz.net[2] to create the c-sharp
bindings, but it is currently not possible to use this tool, because
mummy doesn't work with g++>=5, so I'm stuck with using swig. I don't
know if that has any influence though, because in the end these are
just tools to create the C# source files. 

Then there is also the problem that the key file
Wrapping/Csharp/key.snk is without a source. 

Now, I am completely new to C#, and this is the first time I touched
this package, so any hint what I can to do to resolve this? 

My other option is to simply disable the C# bindings (there are no
revese dependencies). 

The current packaging is done with svn in [3], the original code for
the bindings is in Wrapping/Csharp, and I added a patch   
that moves the keyfile from the assembly to the command line. I also
tried the "delayed sign" option but to no avail (i.e. I'm really flying
blind here).  

Many thanks in advance, 

PS: For those on the debian-cli list, please CC me if you don't cross
-post to Debian-med. 

[1] https://packages.qa.debian.org/g/gdcm.html

[2] http://www.kitware.com/opensource/avdownload.php
[3] svn://svn.debian.org/debian-med/trunk/packages/gdcm/prepare-2.6

Reply to: