简体   繁体   English

从Windows 10和Visual Studio 2015安装Makecert失踪?

[英]Makecert missing from Windows 10 and Visual Studio 2015 install?

I did a clean install of windows 10 and visual studio 2015 and did not find makecert.exe anywhere. 我做了一个干净的Windows 10和Visual Studio 2015安装,并没有找到任何地方的makecert.exe。 Does some other software need to be installed to get this program back? 是否需要安装其他软件才能恢复此程序?

I looked in all the folders under "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\\\" and did not see it in any. 我查看了“C:\\ Program Files(x86)\\ Microsoft SDKs \\ Windows \\\\”下的所有文件夹,但没有看到任何文件夹。

I also opened the "Developer Command Prompt for VS2015" and tried running "makecert" but it was not found. 我还打开了“VS2015的开发人员命令提示符”并尝试运行“makecert”,但未找到。

Install the Windows SDK for Windows 10 . 安装适用于Windows 10Windows SDK If you still can't find it, try the Windows Driver kit . 如果仍然找不到它,请尝试Windows驱动程序工具包

在此输入图像描述

As ShaneH answers in this question makecert.exe has been deprecated, and we should use powershell commandlet New-SelfSignedCertificate. 由于ShaneH在这个问题中回答了 makecert.exe已被弃用,我们应该使用powershell命令行开关New-SelfSignedCertificate。

New-SelfSignedCertificate -Subject "CN=Test Code Signing" -Type CodeSigningCert -KeySpec "Signature" -KeyUsage "DigitalSignature" -FriendlyName "Test Code Signing" -NotAfter (get-date).AddYears(5) New-SelfSignedCertificate -Subject“CN = Test Code Signing”-Type CodeSigningCert -KeySpec“Signature”-KeyUsage“DigitalSignature”-FriendlyName“Test Code Signing”-NotAfter(get-date).AddYears(5)


For older versions of PS, one can get this script from TechNet: https://gallery.technet.microsoft.com/scriptcenter/Self-signed-certificate-5920a7c6 对于旧版本的PS,可以从TechNet获取此脚本: https//gallery.technet.microsoft.com/scriptcenter/Self-signed-certificate-5920a7c6

To make my answer full, below is brief explanation how to use the TechNet script: 为了使我的答案完整,下面简要说明如何使用TechNet脚本:

  1. Navigate to link above and download New-SelfSignedCertificateEx.zip file 导航到上面的链接并下载New-SelfSignedCertificateEx.zip文件
  2. Unzip it somewhere 解压缩到某个地方
  3. Run PowerShell console and navigate to location with new file 运行PowerShell控制台并使用新文件导航到位置
  4. Run command .\\New-SelfSignedCertificateEx to call function. 运行命令。\\ New-SelfSignedCertificateEx来调用函数。 Remember to append necessary parameters. 请记住附加必要的参数。

.\\New-SelfsignedCertificateEx -Subject "CN=Test Code Signing" -EKU "Code Signing" -KeySpec "Signature" -KeyUsage "DigitalSignature" -FriendlyName "Test code signing" -NotAfter [datetime]::now.AddYears(5) 。\\ New-SelfsignedCertificateEx -Subject“CN = Test Code Signing”-EKU“Code Signing”-KeySpec“Signature”-KeyUsage“DigitalSignature”-FriendlyName“Test code signing”-NotAfter [datetime] :: now.AddYears(5)

Two additional notes if you are having problem with this tool. 如果您对此工具有疑问,请另外注意两个。

  1. If PowerShell moans that scripts are disabled, run console as administrator and call this: Set-ExecutionPolicy unrestricted 如果PowerShell支持禁用该脚本,请以管理员身份运行控制台并将其命名为: Set-ExecutionPolicy unrestricted
  2. If PowerShell still refuses to run it, make sure you've prepended .\\ (dot-slash) before the name of the file, as this is necessary. 如果PowerShell仍然拒绝运行它,请确保在文件名前加上 .\\ (dot-slash),因为这是必要的。

After downloading the Windows SDK for Windows, to install the "makecert.exe" you only have to check the "Windows Software Development Kit". 下载Windows SDK for Windows后,要安装“makecert.exe”,您只需要检查“Windows软件开发工具包”。

在此输入图像描述

A quick search of my C: found that makecert.exe seems to be distributed with Fiddler 2 in the C:\\Program Files (x86)\\Fiddler2 folder. 快速搜索我的C:发现makecert.exe似乎与Fiddler 2C:\\Program Files (x86)\\Fiddler2文件夹中一起发布。 This is a much smaller download than the full Windows SDK. 这是一个比完整的Windows SDK小得多的下载。

For the record I have version 4.6.20171.26113 of Fiddler 2. 为了记录,我有Fiddler 2的版本4.6.20171.26113。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM