简体   繁体   English

C#发布问题-未知的.pfx密码

[英]C# Publish Issue - Unknown .pfx Password

I had a developer that created a beta application in C# for one of our clients. 我有一个开发人员,它使用C#为我们的一位客户创建了一个beta应用程序。 The developer has left quite suddenly and when I attempted to make changes to the app then publish it, it asked me for a password for the .pfx which I don't have. 开发人员突然离开了,当我尝试对应用程序进行更改然后发布时,它要求我输入.pfx的密码,而我没有该密码。

In Visual Studio, I went into the project properties, then to Signing and under the Choose a Strong Name Key file, I selected a and created a new file with password. 在Visual Studio中,我进入了项目属性,然后进入“签名”并在“选择一个强名称密钥”文件下,选择了一个并创建了一个带有密码的新文件。 Even with this change, the system is still looking for the old .pfx file and password. 即使进行了此更改,系统仍在寻找旧的.pfx文件和密码。

I've Googled and Googled. 我已经搜索了Googled。 Is there a way to generate a new file and password without having to re-engineer this entire thing? 有没有一种方法可以生成新文件和密码,而不必重新设计整个过程?

I was able to solve this by doing the following: 我可以通过执行以下操作解决此问题:

  1. Open the project folder in Windows Explorer. 在Windows资源管理器中打开项目文件夹。
  2. Find the .pfx file. 找到.pfx文件。
  3. Delete the .pfx file. 删除.pfx文件。
  4. Open the solution in Visual Studio. 在Visual Studio中打开解决方案。
  5. Go to Properties 转到属性
  6. Go to Signing 前往签署
  7. Select Sign the Assembly 选择签署大会
  8. Create a new key file name and generate a password 创建一个新的密钥文件名并生成一个密码
  9. At the top of the Signing page, click Select from File 在“签名”页面顶部,单击“从文件中选择”
  10. Browse to the new .pfx file 浏览到新的.pfx文件
  11. Enter the password 输入密码
  12. Publish the app 发布应用

It means a re-install of the application for the users but since I am doing a code upgrade anyway, I was going to have to do that. 这意味着为用户重新安装该应用程序,但是由于无论如何我都在进行代码升级,因此我将不得不这样做。

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

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