vcsjones / AzureSignTool

SignTool Library and Azure Key Vault Support
MIT License
272 stars 85 forks source link

Signing failed with error 800B0003 on Windows Server 2016 #174

Closed yverle closed 9 months ago

yverle commented 1 year ago

I'm trying to use AzureSignTool to sign an MSIX on our build servers (Windows Server 2016), when I attempt to do so I get the following error:

trce: AzureSignTool.SignCommand[0]
      Creating context
info: AzureSignTool.SignCommand[0]
      Signing file.
trce: AzureSignTool.SignCommand[0]
      Getting SIP Data
trce: AzureSignTool.SignCommand[0]
      Calling SignerSignEx3
fail: AzureSignTool.SignCommand[0]
      The file cannot be signed because it is not a recoginized file type for signing or it is corrupt.
fail: AzureSignTool.SignCommand[0]
      Signing failed with error 800B0003.
info: AzureSignTool.SignCommand[0]
      Stopping file signing.
info: AzureSignTool.SignCommand[0]
      Successful operations: 0
info: AzureSignTool.SignCommand[0]
      Failed operations: 1

However when running the exact same command on the exact same MSIX file on my laptop (Win10) the signing process works without any issues. I've used Visual Studio Installer to install the Universal Windows Platform build tools and ensure the latest version of the Windows SDK is installed on both my laptop and the build servers.

Any idea why this might be?

mvarblow commented 1 year ago

See https://github.com/vcsjones/AzureSignTool/issues/60

The most common cause of this error is when you try to sign a file and there is no SIP in the system for that file type or it's unrecognized. Put another way, Windows doesn't know how to sign that file you gave it.

It looks like signing msix files is not supported on Windows Server 2016. It is supported on Windows Server 2019+.

https://learn.microsoft.com/en-us/windows/msix/supported-platforms