You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

.NET 8 MAUI打包MSIX签名失败:SignTool无法识别文件格式

.NET 8 MAUI生成的MSIX包签名失败问题

在Windows版Visual Studio 2022 17.9.6中发布默认.NET 8 MAUI应用后,对生成的MSIX包执行签名操作时触发错误:

SignTool Error: This file format cannot be signed because it is not recognized

签名环境与命令说明

因公司政策不向开发者分发证书文件,需通过Digicert Keylocker平台工具完成签名,调用的smctl命令为:

smctl sign --keypair-alias=key_123456789 -d=SHA256 --verbose --config-file "e:\TEMP\certing\pkcs11properties.cfg" --input "e:\TEMP\package\testApp.msix"

smctl自动生成的SignTool签名命令如下:

signtool sign  /tr http://timestamp.digicert.com /td SHA256  /fd  SHA256   /csp "DigiCert Signing Manager KSP" /kc "key_123456789" /f "C:\Users\MyUserName\AppData\Local\Temp\1122334455\key_123456789_certificate.pem" "e:\TEMP\package\testApp.msix"

补充信息

  • 其他.exe文件使用相同签名流程可正常完成
  • 环境参数:Windows SDK SignTool版本10.0.22621.2428、Windows 10 22H2(Build 19045.4355)、.NET 8.0.4

目前无法定位问题根源,寻求排查思路与解决方案。


内容的提问来源于stack exchange,提问作者MrMeDkAtEng

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 18:33:25