Search code examples
c#dllnantstrongname

Nant signing error: does not represent a strongly named assembly


I am attempting to run Nant with the delay-sign command, and it is not seeming to work. I have all of my libraries strongly named within visual Studio:

Properties > Signing > Sign is checked and snk file is chosen

This builds and works fin, but when I try to compile with Nant, I get get error:

[delay-sign] Delay-signing 2 assemblies.

[delay-sign] D:\BuildDir\bin\MyLibrary.dll does not represent a strongly named assembly

Now this nant build works fine if I do not try to run the signing, but then my program will not work correctly. My signing looks like this:

<delay-sign keyfile="./mySnk.snk">
    <targets>
        <include name="./bin/Elmah.dll" />
        <include name="./bin/MyLibrary.dll" />
    </targets>
</delay-sign>

I assume I need to do something else to get these strongly named, but I am not sure what. Any ideas? Thank you.


Solution

  • I ended up not delay signing them, but doing them inline with the csc:

    <csc target="library" output="${output.dir}" keyfile="${signing.keyfile}">