gpt4 book ai didi

msbuild - Visual Studio 2015/Windows 10 SDK SignTool.exe 错误?

转载 作者:行者123 更新时间:2023-12-03 21:57:47 24 4
gpt4 key购买 nike

我有一个项目要升级到 Visual Studio 2015,但它仍然面向 .NET 4.5.1。

每当 $(WindowsSDKBinPath) 设置为 Windows 10 SDK "C:\Program Files (x86)\Windows Kits\10\bin\x86\"时,signtool.exe 会以退出代码 255 退出,并且输出会中断,如下所示:

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

通常,如果出现错误,错误就会显示在此处,但仅此而已,它会在此处切断并以退出代码 255 退出。

如果 $(WindowsSDKBinPath) 设置为 Windows 8.1 SDK "C:\Program Files (x86)\Windows Kits\8.1\bin\x86\"那么一切都很好。 SignTool.exe 对 dll 进行签名,没有任何问题,并像往常一样以代码 0 退出。

谁能帮我弄清楚如何使用较新的 signtool 或至少知道它为什么不起作用?下面是我添加到我的 csproj 文件中以使其在构建后签名的目标。谢谢。
<Target Name="AuthenticodeProjectSign" AfterTargets="AfterBuild">
<PropertyGroup>
<AuthenticodeTimestampServerUrl>http://timestamp.verisign.com/scripts/timstamp.dll</AuthenticodeTimestampServerUrl>
<TargetAssembly>$(OutDir)$(TargetFileName)</TargetAssembly>
</PropertyGroup>

<Exec Command="&quot;$(WindowsSDKBinPath)signtool.exe&quot; sign /v /sha1 $(AuthenticodeCertificateSHA1) /t $(AuthenticodeTimestampServerUrl) &quot;$(TargetAssembly)&quot;" />
</Target>

最佳答案

signtool @ my Machine 和 buildserver 正在工作。在 VisualStudio 2015 和 Windows 10 Enterprise 64 位上,我必须在 VisualStudio 设置中添加 ClickOnce 发布工具:
Visual Studio 2015 Setup where you can add ClickOnce

在此之后,您会在其中找到 signtool.exe

  • c:\Program Files (x86)\Windows Kits\8.1\bin\ x64 \
  • c:\Program Files (x86)\Windows Kits\8.1\bin\ x86 \
  • c:\Program Files (x86)\Windows Kits\8.1\bin\ ARM \
  • 关于msbuild - Visual Studio 2015/Windows 10 SDK SignTool.exe 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33192663/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com