views:

763

answers:

2

The process for releasing my application to the client is per the heading

  • Build
  • Clickonce deployment
  • Obfuscating the main executable with Dotfuscator
  • Signing the manifest and .application files with mage
  • Zip for delivery

I'd like to work on an opensource program to automate this as it uses a lot of time everytime a release is needed for the client. I think asking for a solution is a bit much ;) so what would be the ideal format? Batch script, C# application?

Is anyone aware of an existing solution for this process or willing to collaborate on one?

+2  A: 

Why not use a build tool like nant which is extensible with custom tasks as needed.

Since this is a common problem there are likely predefined tasks for most tasks you have, and you can easily call other executables, or write custom code in any .NET language to add tasks.

Rob Walker
+2  A: 

So I guess you are not looking into using MSBuild?

Because that also comes free with the .net SDK. Your Visual Studio projects are already MSBuild project files, so you can use these and modify them to make a complete integrated build.

To generate your ClickOnce deployment, you would then use the following MSBuild tasks:

  • GenerateApplicationManifest
  • GenerateDeploymentManifest
  • Exec
  • SignFile

Because of some issues I also need to run mage after these, eg to update the manifest and sign it, I use the Exec Task for this:

<!-- Correct the codebase property pointing to the application manifest file --><Exec Command="&quot;$(SdkPath)bin\mage&quot; -Update &quot;$(DeploymentManifest)&quot; -AppManifest &quot;$(ApplicationManifest)&quot;" WorkingDirectory="$(PublishDir)" /><!-- Signing the Deployment manifest --><Exec Command="&quot;$(SdkPath)bin\mage&quot; -Sign &quot;$(DeploymentManifest)&quot; -CertFile &quot;$(SolutionRoot)\$(Branch)\Source\esamba.pfx&quot; -Password esamba" WorkingDirectory="$(PublishDir)" />

^sorry, had to put everything on a single line to get it to display the xml.

I hope this helps you.

Rudi
In addition Dotfuscator comes with an MSBuild task and you can use the MSBuild Community Tasks to zip files http://msbuildtasks.tigris.org/
Joe Kuemerle