从源代码管理中丢失后如何生成新的 .pfx 文件? [英] How to generate a new .pfx file after being lost from source control?

查看:17
本文介绍了从源代码管理中丢失后如何生成新的 .pfx 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 GitHub 来托管我正在开发的开源 Windows 10 应用.我不小心 gitignored 我的应用程序的 PFX 文件,所以当我删除我的本地副本并重新克隆 repo 时,我没有 MyApp_TemporaryKey.pfx 文件.现在 Visual Studio 抱怨这个问题,我无法构建解决方案.

I'm using GitHub to host an open-source Windows 10 app I'm developing. I accidentally gitignored my app's PFX file, so when I deleted my local copy and re-cloned the repo, I was left without a MyApp_TemporaryKey.pfx file. Now Visual Studio is complaining about this, and I'm unable to build the solution.

如何重新生成此文件以便再次运行该应用程序?感谢您的帮助.

How do I regenerate this file so I can run the app again? Thanks for helping.

推荐答案

通常,缺少 .pfx 文件只会在 Visual Studio 中引发几个警告,而不会影响项目的建设.

Typically, missing .pfx file will only raise several Warnings in Visual Studio and it won't affect the building of your project.

但如果您想在 Windows 10 应用程序中重新生成此文件,您可以参考 签署应用包(Windows 应用商店应用):

But if you want to regenerate this file in Windows 10 app, you can refer to Renewing a certificate section in Signing an app package (Windows Store apps):

更新证书

  1. 解决方案资源管理器中,打开 .appxmanifest 文件的快捷菜单,选择打开方式,然后选择App Manifest Designer.
  2. 应用清单设计器中,选择打包标签,然后选择选择证书按钮.
  3. 选择证书对话框中,展开配置证书列表,然后选择创建测试证书.
  4. 创建测试证书对话框中,点击确定按钮.
  1. In Solution Explorer, open the shortcut menu for the .appxmanifest file, choose Open With, and then choose App Manifest Designer.
  2. In the App Manifest Designer, choose the Packaging tab, and then choose the Choose Certificate button.
  3. In the Choose Certificate dialog box, expand the Configure Certificate list, and then choose Create test certificate.
  4. In the Create test certificate dialog box, click the OK button.

Visual Studio 使用新的到期日期重新生成证书.

Visual Studio regenerates the certificate with a new expiration date.

这篇关于从源代码管理中丢失后如何生成新的 .pfx 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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