更改 ClickOnce 应用程序中的部署提供程序代码库而不重建它

Changing the deployment provider codebase in a ClickOnce application without rebuilding it

是否可以在不重建安装程序的情况下更改 ClickOnce *.application 配置文件中的 deploymentPorvider 代码库位置?

目前我遇到以下异常:

    System.Deployment.Application.InvalidDeploymentException (SignatureValidation)
    - Manifest XML signature is not valid.
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
        at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
    --- Inner Exception ---
    System.Security.Cryptography.CryptographicException
    - The digital signature of the object did not verify.

    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
        at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)

是的,有可能!您可以使用 MageUI.exe 或 Mage.exe(命令行工具)修改该文件。如果你使用 mage,那么 mage 可以处理很多需要发生的细节,以确保所有文件都处于一致的状态。这是 general link on mage, and here's another link that talks about the deployment provider specifically(请参阅名为 设置和更改部署提供程序 的部分)