签署 Windows Phone XAP 文件时出错 ->SignTool 错误:由于无法识别此文件格式,因此无法对其进行签名 [英] Error Signing Windows Phone XAP file -> SignTool Error: This file format cannot be signed because it is not recognized
问题描述
我刚刚获得了对 Windows Phone 应用程序进行签名的证书,当我尝试运行此命令时:
I've just got my certificate to sign Windows Phone Apps and when I try to run this command:
XapSignTool.exe sign /v C:\Temp\MyApp_Release_AnyCPU.xap
我使用的是 Visual Studio 2012 Express.
I'm using Visual Studio 2012 Express.
我有一个奇怪的行为:
选择了以下证书:颁发给:XXXXXX颁发者:Symantec Enterprise Mobile CA for Microsoft到期:XXXXXXSHA1 哈希值:XXXXX完成添加额外的商店签名成功:C:\Users\Fernando\AppData\Local\Temp\tmp7E47.tmp\MyApp.dll成功签名的文件数:1警告数:0错误数:0
The following certificate was selected: Issued to: XXXXXX Issued by: Symantec Enterprise Mobile CA for Microsoft Expires: XXXXXX SHA1 hash: XXXXX Done Adding Additional Store Successfully signed: C:\Users\Fernando\AppData\Local\Temp\tmp7E47.tmp\MyApp.dll Number of files successfully Signed: 1 Number of warnings: 0 Number of errors: 0
选择了以下证书:颁发给:XXXXXX颁发者:Symantec Enterprise Mobile CA for Microsoft到期:XXXXXXSHA1 哈希值:XXXXXX完成添加额外的商店成功签名的文件数:0警告数:0错误数:1
The following certificate was selected: Issued to: XXXXXX Issued by: Symantec Enterprise Mobile CA for Microsoft Expires: XXXXXX SHA1 hash: XXXXXX Done Adding Additional Store Number of files successfully Signed: 0 Number of warnings: 0 Number of errors: 1
SignTool 错误:由于无法识别此文件格式,因此无法对其进行签名.SignTool 错误:尝试签名时出错:C:\Users\Fernando\AppData\Local\Temp\tmp7E48.tmp\MyApp_Release_AnyCPU.xap
SignTool Error: This file format cannot be signed because it is not recognized. SignTool Error: An error occurred while attempting to sign: C:\Users\Fernando\Ap pData\Local\Temp\tmp7E48.tmp\MyApp_Release_AnyCPU.xap
XapSignTool 错误:signtool.exe 失败,退出代码为 1.
XapSignTool Error: signtool.exe failed with exit code 1.
计时器:主要:528.4msExtractZip(C:\Temp\MyApp_Release_AnyCPU.xap):198.5ms签署PE文件:120.4msLaunchSignTool(C:\Users\Fernando\AppData\Local\Temp\tmp7E47.tmp\MyApp.dll):93.0msCreateXap(C:\Temp\MyApp_Release_AnyCPU.xap):107.5ms签署 XAP 文件:-63524687248290.1msLaunchSignTool(C:\Users\Fernando\AppData\Local\Temp\tmp7E48.tmp\MyApp_Release_AnyCPU.xap):56.0ms
Timers: Main:528.4ms ExtractZip(C:\Temp\MyApp_Release_AnyCPU.xap):198.5ms Signing PE files:120.4ms LaunchSignTool(C:\Users\Fernando\AppData\Local\Temp\tmp7E47.tmp\MyApp.dll): 93.0ms CreateXap(C:\Temp\MyApp_Release_AnyCPU.xap):107.5ms Signing XAP file:-63524687248290.1ms LaunchSignTool(C:\Users\Fernando\AppData\Local\Temp\tmp7E48.tmp\MyApp_Release_AnyCPU.xap):56.0ms
清理:6.2ms
谁能帮帮我?对我来说听起来很奇怪...
Can anyone help me? Sounds weird to me...
推荐答案
看来我试图使用 x64 文件夹中的 signtool.exe.使用 x86 文件夹中的那个就可以了!
It seems I was trying to use signtool.exe from x64 folder. Using the one from x86 folder works ok!
这篇关于签署 Windows Phone XAP 文件时出错 ->SignTool 错误:由于无法识别此文件格式,因此无法对其进行签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!