我正在使用 GitHub 托管我正在开发的开源 Windows 10 应用程序。我不小心 gitignored 我的应用程序的 PFX 文件,所以当我删除我的本地副本并重新克隆存储库时,我没有 MyApp_TemporaryKey.pfx
文件。现在 Visual Studio 对此有提示,我无法构建解决方案。
如何重新生成此文件以便再次运行该应用程序?感谢您的帮助。
最佳答案
通常,缺少 .pfx
文件只会在 Visual Studio 中引发几个警告,而不会影响项目的构建。
但如果你想在 Windows 10 应用程序中重新生成此文件,你可以引用 Signing an app package (Windows Store apps) 中的更新证书部分。 :
To renew the certificate
- In Solution Explorer, open the shortcut menu for the .appxmanifest file, choose Open With, and then choose App Manifest Designer.
- In the App Manifest Designer, choose the Packaging tab, and then choose the Choose Certificate button.
- In the Choose Certificate dialog box, expand the Configure Certificate list, and then choose Create test certificate.
- In the Create test certificate dialog box, click the OK button.
Visual Studio regenerates the certificate with a new expiration date.
关于c# - 从源代码管理丢失后如何生成新的 .pfx 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35475059/