如何获取 .pfx 文件? [英] How do I get the .pfx file?

查看:24
本文介绍了如何获取 .pfx 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 UWP 应用.我将源代码存储在 Azure DevOps Services 中.我可以在我的台式电脑上调试它.但是,我不能在我的笔记本电脑上.问题是我的笔记本电脑上没有调试所需的 .pfx 文件.我从 Microsoft Ignite 会议回来,在那里我了解到我应该将 .pfx 从我的桌面复制到我的笔记本电脑上.所以我试图找到它(它被命名为 Blank_TemporaryKey.pfx),但它不在目录中.查看 Visual Studio,我看到它在解决方案资源管理器中的文件旁边有一个黄色三角形.我的猜测是不知何故它被删除了,但是 VS 2019 需要我在桌面上调试它的东西已经到位.

我现在想知道的是,是否可以从我的桌面上提取 .pfx 文件所需的内容,以便我可以在我的笔记本电脑上使用它来完成这个项目?

这是我在桌面解决方案资源管理器中看到的屏幕截图:

解决方案

您可以在 Package.appxmanifest 中手动生成新的测试证书.

p>p

如果使用 Visual Studio 自动生成的 .gitignore 文件,.pfx 证书文件在其忽略列表中,不会上传到代码库.但是这个证书文件是记录在解决方案的文件列表中的,所以初次同步后会提示找不到文件.

这种设计的原因是测试证书是根据您的设备和当前帐户生成的.更换其他设备进行开发时,原测试证书指纹无法匹配,需要生成新证书.

最好的问候.

I am working on a UWP app. I store the source code in Azure DevOps Services. I can debug it fine on my desktop PC. However, I cannot on my laptop. The issue is that I don't have the .pfx file necessary for debugging, on my laptop. I returned from the Microsoft Ignite conference, where I learned that I should copy the .pfx from off of my desktop onto my laptop. So I tried to find it (it's named Blank_TemporaryKey.pfx), but it isn't in the directory. Looking at Visual Studio I see that it has a yellow triangle next to the file in the Solution Explorer. My guess is that somehow it was deleted, but what VS 2019 needs for me to debug it on the desktop is already in place.

What I'd like to know now is if it is possible to extract what is needed for a .pfx file, from what's on my desktop, so I can use it on my laptop for this project?

Here's a screen shot of what I'm seeing in Solution Explorer on my desktop:

解决方案

You can manually generate a new test certificate in Package.appxmanifest.

If you use a .gitignore file that is automatically generated by Visual Studio, the .pfx certificate file is in its ignore list and will not be uploaded to the codebase. However, this certificate file is recorded in the file list of the solution, so there will be a prompt to find the file after the initial synchronization.

The reason for this design is that the test certificate is generated based on your device and current account. When you replace another device for development, the fingerprint of the original test certificate cannot match, you need to generate a new certificate.

Best regards.

这篇关于如何获取 .pfx 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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