Visual Studio签名失败(signtool.exe错误) [英] Visual studio signing failed (signtool.exe error)

查看:265
本文介绍了Visual Studio签名失败(signtool.exe错误)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天下午接受Windows的次要更新后,我发现我无法再对Visual Studio应用程序进行签名构建.

深入研究这个问题,我遇到了一个晦涩目录(C:\ Program Files(x86)\ Windows Kits \ 10 \ bin \ 10.0.18362.0 \ x64)中的signtool.exe程序.使用命令提示符,我尝试手动运行它以对我的应用程序进行签名,但是这样做时,什么也没发生:没有输出,没有错误消息.我还尝试了在没有参数的情况下运行它,而没有期望帮助消息或至少出现错误的信息,但同样,没有任何反应.

我去了另一台今天还没有收到Windows更新的计算机,找到了相同的文件并运行它:它运行良好.

以为我在第一台计算机上一定有损坏的.exe文件,我从另一台计算机复制了该版本,但是仍然失败.但是,如果我重命名该文件,则它将运行.例如,如果我将其重命名为"signtool1.exe",则可以从命令行运行它,尽管Visual Studio仍然由于名称更改而无法运行它.

在此过程中,我确实尝试过几次重新启动计算机,以为可能有副本保留在内存中,但是没有.我也在任务管理器中搜索过它.

我以前从未见过这样的东西.根据可执行文件的名称,同一程序将运行还是不执行任何操作.还有一个细节,如果我将其复制到主目录中,它实际上将与文件名无关地运行.是什么原因引起的?

谢谢, 弗兰克

解决方案

与重命名signtool.exe相比,我发现重命名/删除signtool.exe.manifest允许运行signtool,同时仍允许Visual Studio运行它./p>

我不知道为什么会这样,或者删除清单的副作用是什么,但这足以使我的项目再次构建.

作为参考,我在干净的Windows 10 1909 VM中进行了干净的VS2019安装后遇到了此问题(但不久后进行了完全更新).

After accepting a minor Windows update this afternoon, I found that I could no longer make signed builds of my Visual Studio application.

Digging in to the problem, I came upon the signtool.exe program which is located in an obscure directory (C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64). Using the command prompt, I tried manually running it to sign my app, but when I did so, nothing happened: no output, no error message. I also tried running it with no parameters expecting a help message or at least an error, but again, nothing.

I went to another computer that hadn't yet received any Windows updates today, found the same file, and ran it: and it worked fine.

Thinking I must have had a damaged .exe file on the first computer, I copied the version from the other computer, but it still failed. However, if I rename the file, then it runs. For example if I rename it to "signtool1.exe" I can then run it from the command line just fine, although Visual Studio still can't run it because of the name change.

I did try rebooting my computer several times during this process thinking maybe there was a copy of it stuck in memory, but there isn't. I also searched for it in the Task Manager.

I've never seen anything like this before. The same program runs or does nothing depending on the name of the executable file. One more detail, it actually runs regardless of the filename if I copy it to my home directory. What could cause such a thing?

Thanks, Frank

解决方案

Instead of renaming signtool.exe, I found that renaming/removing signtool.exe.manifest allows signtool to run while also still allowing Visual Studio to run it.

I do not know why this is happening or what the side effects of removing the manifest are, but it's enough for my project to build again.

For reference, I encountered this issue after doing a clean VS2019 install in a clean Windows 10 1909 VM (but fully updated shortly after).

这篇关于Visual Studio签名失败(signtool.exe错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆