Reputation: 3667
I have a project that I'm upgrading to Visual Studio 2015 but it's still targeting .NET 4.5.1.
Whenever $(WindowsSDKBinPath) is set to the Windows 10 SDK "C:\Program Files (x86)\Windows Kits\10\bin\x86\" the signtool.exe exits with exit code 255 and the output cuts off like the following:
The following certificate was selected:
Issued to: XXXX
Issued by: VeriSign Class 3 Code Signing 2010 CA
Expires: Tue Apr 11 19:59:59 2017
SHA1 hash: XXXX
Done Adding Additional Store
Usually an error would show up right here if there was going to be an error but that's it, it's cuts off right here and exits with exit code 255.
If $(WindowsSDKBinPath) is set to the Windows 8.1 SDK "C:\Program Files (x86)\Windows Kits\8.1\bin\x86\" then everything is fine. SignTool.exe signs the dll without any issues and exits with code 0 like normal.
Can anyone help me figure out how to use the newer signtool or at least know why it's not working? Below is the target I added to my csproj file to get it to sign after building. Thanks.
<Target Name="AuthenticodeProjectSign" AfterTargets="AfterBuild">
<PropertyGroup>
<AuthenticodeTimestampServerUrl>http://timestamp.verisign.com/scripts/timstamp.dll</AuthenticodeTimestampServerUrl>
<TargetAssembly>$(OutDir)$(TargetFileName)</TargetAssembly>
</PropertyGroup>
<Exec Command=""$(WindowsSDKBinPath)signtool.exe" sign /v /sha1 $(AuthenticodeCertificateSHA1) /t $(AuthenticodeTimestampServerUrl) "$(TargetAssembly)"" />
</Target>
Upvotes: 4
Views: 1912
Reputation: 71
I ran into the same problem where signtool exits with exit code 255 when using :
C:\Program Files (x86)\Windows Kits\10\bin\x86\signtool.exe
But somehow it works fine using :
C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe
Upvotes: 0
Reputation: 1080
signtool @ my Machine and on the buildserver is working. On VisualStudio 2015 and Windows 10 Enterprise 64bit, I had to add the ClickOnce Publishing Tools in VisualStudio Setup:
After this you find signtool.exe in
Upvotes: 2