File Attachment: ClickOnceTasks.zip (11 KB)
Leveraging the code that MS Patterns and Practices released for ClickOnce I made a MSBuild task to resign a ClickOnce deployment.
Scenario: Moving a ClickOnce deployment from a QA environment to a Production Staged then again to Production.
A ClickOnce deployment must be resigned if files are changed, say the download URL and/or the client configuration file change. Using this MSBuild task I was able to automate the moving of a ClickOnce deployment to different environments. This task is very simple but got the job done. An example of the usage is shown below.
<Project DefaultTargets="UpdateClient" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="ClickOnceTasks.SaveAndSignManifest" AssemblyFile=".\bin\Debug\MsbuildTest\ClickOnceTasks.dll" /> <Target Name="UpdateClient"> <SaveAndSignManifest FileName="Example.application" CertPath=".\Example_TemporaryKey.pfx" DeploymentProvider="http://localhost/ExampleClient/Example.application" /> </Target> </Project>
The files are first copied and changed to the the new download location then the above tasks is run to resign the ClickOnce deployment.
Remember Me
Powered by: newtelligence dasBlog 2.1.8102.813
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
E-mail
Theme design by Jelle Druyts