Windows 10和Visual Studio 2015安装中缺少Makecert?

时间:2015-08-02 12:57:40

标签: visual-studio-2015 windows-10 makecert

我做了一个干净安装的Windows 10和visual studio 2015,并没有找到任何地方的makecert.exe。是否需要安装其他软件才能恢复该程序?

我查看了“C:\ Program Files(x86)\ Microsoft SDKs \ Windows \\”下的所有文件夹,但没有在任何文件夹中看到它。

我还打开了“VS2015的开发人员命令提示符”,并尝试运行“makecert”,但未找到。

4 个答案:

答案 0 :(得分:50)

安装Windows SDK for Windows 10。如果您仍然无法找到它,请尝试Windows Driver kit

enter image description here

答案 1 :(得分:36)

由于ShaneH this question makecert.exe中的答案已被弃用,我们应该使用powershell命令行开关New-SelfSignedCertificate。

  

New-SelfSignedCertificate -Subject" CN =测试代码签名" -Type CodeSigningCert -KeySpec" Signature" -KeyUsage" DigitalSignature" -FriendlyName"测试代码签名" -NotAfter(get-date).AddYears(5)

对于旧版本的PS,可以从TechNet获取此脚本: https://gallery.technet.microsoft.com/scriptcenter/Self-signed-certificate-5920a7c6

为了使我的答案完整,下面简要说明如何使用TechNet脚本:

  1. 导航到上面的链接并下载New-SelfSignedCertificateEx.zip文件
  2. 将其解压缩到某个地方
  3. 运行PowerShell控制台并使用新文件导航到位置
  4. 运行命令。\ New-SelfSignedCertificateEx来调用函数。记得 追加必要的参数。
  5.   

    。\ New-SelfsignedCertificateEx -Subject" CN =测试代码签名" -eku   "代码签名" -KeySpec"签名" -KeyUsage" DigitalSignature"   -FriendlyName"测试代码签名" -NotAfter [datetime] :: now.AddYears(5)

    如果您遇到此工具的问题,请另外注意两个。

    1. 如果PowerShell支持禁用脚本,请以管理员身份运行控制台并将其命名为:Set-ExecutionPolicy unrestricted
    2. 如果PowerShell仍然拒绝运行它,请确保您在文件名之前预先 .\(点斜杠),因为这是必要的。

答案 2 :(得分:4)

下载Windows SDK for Windows后,安装" makecert.exe"您只需要检查" Windows软件开发工具包"。

enter image description here

答案 3 :(得分:3)

快速搜索我的C:发现makecert.exe似乎与C:\Program Files (x86)\Fiddler2文件夹中的Fiddler 2一起分发。这是一个比完整的Windows SDK小得多的下载。

对于记录,我有Fiddler 2的版本4.6.20171.26113。