c# - 从源代码管理丢失后如何生成新的 .pfx 文件?

标签 c# uwp windows-runtime windows-10 win-universal-app

我正在使用 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

  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 regenerates the certificate with a new expiration date.

关于c# - 从源代码管理丢失后如何生成新的 .pfx 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35475059/

相关文章:

c# - 如何使用 C# 压缩消息并使用 javascript 解压缩消息?

javascript - 如何在不使用 WinjS 库的情况下在通用 Windows 应用程序中添加后退按钮事件?

c# - 如何在 WinRT 中枚举颜色?

c# - 当按下 'Enter' 键而不是提交时移动到下一个文本框 (Windows Phone)

xaml - 自定义 GroupItem HeaderTemplate UWP

windows-runtime - 如何以编程方式清除 Windows 8.1 中的 SearchBox 控件历史记录?

c# - 在 Windows Phone 8 中获取 UI 调度程序

c# - 按对象的字段组合列表中的对象

c# - 在datagridview中隐藏指定的单元格边框?

c# - WPF 的 CefSharp 不显示