我无法构建具有强名称密钥签名的项目-标题中的消息总是出现。
是的,项目最初是从另一台机器复制过来的。然而,即使我通过“项目属性”中的“签名”选项卡添加了一个新密钥,仍然会显示此错误。
我曾尝试以管理员身份运行Visual Studio,并尝试手动将密钥添加到Windows证书存储区。
的帮助!
编辑:我没有得到这个错误与一个新项目,但我很想让这个现有的项目工作。即使我创建了一个新的证书,它也不能工作!
我无法构建具有强名称密钥签名的项目-标题中的消息总是出现。
是的,项目最初是从另一台机器复制过来的。然而,即使我通过“项目属性”中的“签名”选项卡添加了一个新密钥,仍然会显示此错误。
我曾尝试以管理员身份运行Visual Studio,并尝试手动将密钥添加到Windows证书存储区。
的帮助!
编辑:我没有得到这个错误与一个新项目,但我很想让这个现有的项目工作。即使我创建了一个新的证书,它也不能工作!
当前回答
试试这个:
右键点击你的项目→转到属性→点击屏幕左侧的签名→取消选中签名,单击一次显示→保存和构建
其他回答
转到visual studio中的项目“属性”。然后进入签名标签。
然后确保“签名单击一次”清单已关闭。
OR
1.在记事本中打开.csproj文件。
2.删除证书存储中与签名证书相关的如下信息 xxxxx xxxxxx xxxxxxxx.pfx 真正的 假 `
为我工作。
Assuming this is a personal certificate created by windows on the system you copied your project from, you can use the certificate manager on the system where the project is now and import the certificate. Start the certificate manager (certmgr) and select the personal certificates then right click below the list of existing certificates and select import from the tasks. Use the browse to find the .pfx in the project (the .pfx from the previous system that you copied over with the project). It should be in the sub-directory with the same name as the project directory. I am familiar with C# and VS, so if that is not your environment maybe the .pfx will be elsewhere or maybe this suggestion does not apply. After the import you should get a status message. If you succeeded, the compile certificate error should be gone.
仅手动向Windows证书存储区添加密钥是不够的。证书只包含已签名的公钥。您还必须导入与证书中的公钥相关联的私钥。pfx文件在单个文件中包含公钥和私钥。这就是你需要导入的东西。
我终于找到解决办法了。
编辑项目的.csproj文件。 删除以下代码行: < PropertyGroup > < ManifestCertificateThumbprint >...........</ ManifestCertificateThumbprint > < / PropertyGroup > < PropertyGroup > < ManifestKeyFile > xxxxxxxx.pfx < / ManifestKeyFile > < / PropertyGroup > < PropertyGroup > 真正< GenerateManifests > < / GenerateManifests > < / PropertyGroup > < PropertyGroup > 假< / SignManifests < SignManifests > > < / PropertyGroup >
试试这个:
右键点击你的项目→转到属性→点击屏幕左侧的签名→取消选中签名,单击一次显示→保存和构建