Home - Forums-.NET - Spices.Net - SignTool could not be foundFailed to sign the assembly

Spices.Net

NET code security, tools to protect, obfuscate, tamper defense, code and data safety, recover, convert, optimize, explore, browse and analyze .Net software.

This forum related to following products: Spices.Net Suite, Spices.Net Obfuscator, Spices.Net Decompiler

SignTool could not be foundFailed to sign the assembly
Link Posted: 01-Aug-2010 10:35
To whom it may concern,

I'm currently trying out the evaluation edition of Spices.Net Obfuscator v.5.8.0.24 and I'm using Visual Studio 2010.

I created a Spices.NET project and have figured out how to add the StrongNameKeyFile and StrongNameKeyFilePassword. This works as I don't get errors associated with the strong name key file anymore.

However, now I'm getting this:

----End of obfuscation C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ------------
SignTool could not be foundFailed to sign the assembly: C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe
Signing of C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe failed

I can't figure out what to do at this point and can't find any help in the forum.

NOTE: I added the path (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin) to SignTool.exe to SearchPaths in Options, but this didn't help.

NOTE 2: I've ended up confusing myself a bit further. I tried creating a .snk file because the project is using a .pfx file. Not sure what the difference between the two are. I set this by selecting Sign Assembly from the options for the project. Anyway, now I'm getting the following:

----End of obfuscation C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ------------
Failed to sign the assembly: C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe
Signing of C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe failed

NOTE 3: I've make a little more progress, but am still not there yet. If I create a .snk file (no password) in my VS 2010 project and then add this key to my Spices.NET project, everything works when I obfuscate. If I create a .pfx file (same as .snk file, but with a password) in my VS 2010 project and then add the key and password to my Spices.NET project, I get the following (again):

----End of obfuscation C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\SqlBackUp\bin\Release\SQLBackup.exe ------------
SignTool could not be foundFailed to sign the assembly: C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe
Signing of C:\Users\ct\Documents\Visual Studio 2010\Projects\SQLBackup\Spices_output\SQLBackup.exe failed

I feel like I'm close to figuring this out and getting this to work, but I'm still stuck.

Can you help me?

Best regards,
ct
Link Posted: 02-Aug-2010 05:25
Sorry for delivered inconveniences.
Currently Spices searches sn.exe at the .Net 2.0 Framework SDK location.
We're working on a solution of this problem and will publish fix today/tomorrow (I'll let you know when fix will be available for downloading).
To solve this problem now you can install the full version of .Net 2.0 Framework SDK or wait the fixed version.
Link Posted: 02-Aug-2010 06:48
OK, thank you. I will wait for you to update this and try again.

BTW - My application is using .NET Framework 4.

Best regards,
ct
Link Posted: 02-Aug-2010 06:55
Hi! One more quesiton...

If I install the .NET 2.0 Framework SDK so that sn.exe will work, do I also have to change the target framework of my application to .NET 2.0?

Best regards,
ct
Link Posted: 02-Aug-2010 07:45
I think it would be better if you change target framework to .Net 2.0 (with fixed version it will be possible without changing target framework - assemblies for both frameworks will be resigned successfully).
Link Posted: 02-Aug-2010 07:58
That's unfortunately not going to be possible, so I have to wait for the update. I'm glad that you'll have it out today or tomorrow.

Are there any other concerns regarding .NET 4 that I should be concerned about? We are using .NET Framework 4 for most of our new development now.

Best regards,
ct
Link Posted: 02-Aug-2010 11:45
There are currently no unresolved issues related to .Net 4.0 (excluding problem with SignTool)
Link Posted: 03-Aug-2010 01:24
The fixed version of Spices.Net (v.5.8.0.26) is available for downloading.

What should you know:

  1. For GUI version of Spices.Obfuscator and VSIP version:
    Spices.Net trying to automatically detect the latest version of sn.exe installed. If there is no sn.exe found/detected,

    • You can place sn.exe to the Spices.Net \Bin folder (Spices.Obfuscator will try to find sn.exe at this place)
    • Specify location of this file in the NineRays.Services plugin settings (menu Tools-PluginManager-select NineRays.Services plugin-Click Properties button - PathToSignTool (full path with name of file))


  2. MSBuild tasks (these tasks don't automatically detect location of sn.exe):
    In the case of .pfx strong name key usage, you should specify SignTool (sn.exe) location in the PathToSignTool property (Obfuscator task, AssemblyResign task)

  3. Console version (doesn't automatically detect location of sn.exe):
    In the case of .pfx strong name key usage, you should specify SignTool (sn.exe) location with SNPATH= parameter of command line.