Click here to Skip to main content
15,886,780 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I try to change deploy URL in CickOnce manifests.
I use next code
C#
X509Certificate2 ct = new X509Certificate2(sertFilePath, sertPassword /*, X509KeyStorageFlags.MachineKeySett*/);
            ApplicationManifest am = ManifestReader.ReadManifest("ApplicationManifest", sPathMftApp, false) as ApplicationManifest;
            am.ResolveFiles();
            am.UpdateFileInfo();
            ManifestWriter.WriteManifest(am, sPathMftApp);
            SecurityUtilities.SignFile(ct, null, sPathMftApp);

            DeployManifest dm = ManifestReader.ReadManifest("DeployManifest", sPathMftDepl, false) as DeployManifest;
            dm.DeploymentUrl = newDeplUrl;
            dm.ResolveFiles();
            dm.UpdateFileInfo();
            ManifestWriter.WriteManifest(dm, sPathMftDepl);
            SecurityUtilities.SignFile(ct, null, sPathMftDepl);
        }


and i get next exception
The reference in the deployment does not match the identity defined in the application manifest
what am I doing wrong?
,

What I have tried:

I followed next soltions
http://stackoverflow.com/questions/11141655/updating-deployment-manifest-for-a-clickonce-application-programmatically-result
https://msdn.microsoft.com/en-us/library/aa480721.aspx
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900