Failed to sign the 'ProQuickDraw.dll' file (HRESULT = -2147467259)

Add-in Express™ Support Service
That's what is more important than anything else

Failed to sign the 'ProQuickDraw.dll' file (HRESULT = -2147467259)
Signing Failure 
Troy Bigelow




Posts: 3
Joined: 2020-06-02
Hey Add-in Express Support,

I recently began getting an error after building my add-in solution...

ProQuickDraw -> Sign ProQuickDraw.dll... Failed. See the 'Error List' window for more details.


Signing options haven't changed, cert hasn't changed or expired. Here are the Error List details...

Severity Code Description Project File Line Suppression State
Warning Add-in Express for Microsoft Office and .NET error: Signing failed (ProQuickDraw). Failed to sign the 'C:\Dev\ProQuickDraw4\ProQuickDraw\bin\Debug\ProQuickDraw.dll' file (HRESULT = -2147467259).
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(Inner Exception)
Date and Time: 6/2/2020 12:40:25 PM
Machine Name: GEEKDEV10
IP Address: fe80::c13:2858:de76:2628%13
Current User: GEEKDEV10\troy

Application Domain: DefaultDomain
Assembly Codebase: file:///C:/Program Files (x86)/Add-in Express/Add-in Express for .NET/Bin/Packages/VS2017/AddinExpress.VSPackage.dll
Assembly Full Name: AddinExpress.VSPackage, Version=9.4.4644.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 9.4.4644.0

Exception Source: AddinExpress.VSPackage
Exception Type: System.ComponentModel.Win32Exception
Exception Message: Unknown error (0x80072ee2)
Exception Target Site: SignCode

---- Stack Trace ----
AddinExpress.Projects.Common.NativeSigner.SignCode(pSubjectInfo As IntPtr, pSignerCert As IntPtr, pSignatureInfo As IntPtr, pProviderInfo As IntPtr, tsaServer As String, useSHA256 As Boolean, appendSignature As Boolean)
AddinExpress.VSPackage.dll: N 0395 (0x18B) IL
AddinExpress.Projects.Common.NativeSigner.Sign(appPath As String, cert As X509Certificate, tsaServer As String, useSHA256 As Boolean, appendSignature As Boolean)
AddinExpress.VSPackage.dll: N 0062 (0x3E) IL



(Outer Exception)
Date and Time: 6/2/2020 12:40:25 PM
Machine Name: GEEKDEV10
IP Address: fe80::c13:2858:de76:2628%13
Current User: GEEKDEV10\troy

Application Domain: DefaultDomain
Assembly Codebase: file:///C:/Program Files (x86)/Add-in Express/Add-in Express for .NET/Bin/Packages/VS2017/AddinExpress.VSPackage.dll
Assembly Full Name: AddinExpress.VSPackage, Version=9.4.4644.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 9.4.4644.0

Exception Source: AddinExpress.VSPackage
Exception Type: System.ComponentModel.Win32Exception
Exception Message: Failed to sign the 'C:\Dev\ProQuickDraw4\ProQuickDraw\bin\Debug\ProQuickDraw.dll' file (HRESULT = -2147467259).
Exception Target Site: SignBinaryFile

---- Stack Trace ----
AddinExpress.Projects.Common.Signer.SignBinaryFile(certificate As X509Certificate2, filePath As String, sha1 As Boolean, sha256 As Boolean, timestamp As String, timestampSHA256 As String)
AddinExpress.VSPackage.dll: N 0094 (0x5E) IL
AddinExpress.Projects.Common.Registrator.SignProject(project As Project, projectFolder As String, primaryOutput As String, intermediateDir As String, supportLoader As Boolean)
AddinExpress.VSPackage.dll: N 0670 (0x29E) IL ProQuickDraw AddinExpress.VSPackage 0


Would you be able to provide any additional error details to help me resolve this issue? Please let me know if you need any other information.

Cheers!

Troy Bigelow
Posted 02 Jun, 2020 12:02:51 Top
Andrei Smolin


Add-in Express team


Posts: 17306
Joined: 2006-05-11
Hello Troy,

-2147467259 stands for 0x80004005 which means insufficient or wrong permissions or such. I'd check if the files to be signed are not loaded by the host application, that they are writable, and that Visual Studio is started via Run as administrator.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 02 Jun, 2020 12:07:11 Top
Troy Bigelow




Posts: 3
Joined: 2020-06-02
Hey Andrei,

Thanks for the info. I definitely think that is the issue, as VS will freeze on Signing ProQuickDraw.dll. However, I cannot determine what is locking the file. Fresh reboot, delete bin/obj folders, and build. Same issue. I can delete the dll after the signing failure. I fired up FileMon, see if there is anything there, MSBuild.exe creates the dll, then devenv.exe opens it and hangs, and finally errors out with Sign filed message.

I'm going to take a look at getting adxpatch.exe configured as a post build event.

Cheers!

Troy
Posted 02 Jun, 2020 14:38:23 Top
Troy Bigelow




Posts: 3
Joined: 2020-06-02
Hey Andrei,

Think I got to the bottom of this. Looks like my timestamp server is timing out. Removed the server url from Signing Options and it worked. Updated the options with an alternative timestamp server URL, worked as well.

Thanks for the help, Cheers!

Troy
Posted 02 Jun, 2020 15:39:50 Top
Andrei Smolin


Add-in Express team


Posts: 17306
Joined: 2006-05-11
Welcome!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 03 Jun, 2020 00:37:24 Top