【发布时间】:2021-02-17 02:23:23
【问题描述】:
我在 Visual Studio 2010、C#、.NET Framework 3.5、VSTO 上有项目Excel COM 插件。最近一位客户增加了要求:需要用证书签名。我从 Sectigo 购买了“EV 证书”,我可以对我的整个设置、exe、.dll 等进行签名。但后来我尝试使用这个证书对 Project --> Properties --> "Sign the ClickOnce manifests" 进行签名,我什至不能运行项目。我在下面粘贴时收到错误消息。
这是我第一次使用证书。似乎我的项目正在使用 sha1,它已于 2017 年弃用。如何将我的项目更新为 sha256?
在清单中,例如我看到:
错误代码:
Exception reading manifest from file:///C:/Users/...vsto: the manifest may not be valid or the file could not be opened.
************** Exception Text **************
System.Deployment.Application.InvalidDeploymentException: Exception reading manifest from file:///C:/Users/...vsto: the manifest may not be valid or the file could not be opened. ---> System.Deployment.Application.InvalidDeploymentException: Manifest XML signature is not valid. ---> System.Security.Cryptography.CryptographicException: SignatureDescription could not be created for the signature algorithm supplied.
at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key)
at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey)
at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
--- End of inner exception stack trace ---
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
【问题讨论】:
-
你可以使用visual studio community 2019来构建项目吗?
-
遗憾的是甚至无法选择 2013,因为 Visual Studio 不再支持“Visual Studio Installer”。
标签: c# visual-studio visual-studio-2010 vsto sha256