I am using CruiseControl to run a Nant script to build and deploy a VS winforms solution. 
 
The first thing done in the deply script is to modify the app.config file to match the environment deployet to, and then MAGE (Manifest Generation and Editing Tool) is executed to sign the solution.
It worked once or twice, but then the deployment fails because it can not open the certificate. If the certificate is copied back and forth it sometimes works again.
 
Here is part of the error message:
 
[exec] Application cache cleared.
[exec] XXX.exe.manifest successfully created
[exec] Unable to open certificate "C:\Deploy\Shell_TemporaryKey.pfx":
[exec] The system cannot find the file specified.
Build Error: NAnt.Core.BuildException
External Program Failed: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mage.exe (return code was 1)
in \\172.28.0.82\SuccesBuilds\XXX\88\Deploy.XXX.build line: 65 col: 4
   at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask()
   at NAnt.Core.Tasks.ExecTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()
And the Nant script:
 
<exec program="C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mage.exe" commandline="-cc"/>
  <exec program="C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mage.exe" commandline="-New Application -ToFile &quot;${project.basedir}\Publish\1.0.0.${CCNetLabel}\XXX.exe.manifest&quot; -Name ProgramName -Version 1.0.0.${CCNetLabel} -FromDirectory &quot;${project.basedir}\Publish\1.0.0.${CCNetLabel}\bin&quot;" />
  <exec program="C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mage.exe" commandline="-Sign &quot;${project.basedir}\Publish\1.0.0.${CCNetLabel}\XXX.exe.manifest&quot; -CertFile &quot;C:\Deploy\Shell_TemporaryKey.pfx&quot;" />
  <exec program="C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mage.exe" commandline="-New Deployment -ToFile &quot;${project.basedir}\Publish\XXX.application&quot; -Name ProgramName -Version 1.0.0.${CCNetLabel} -AppManifest &quot;${project.basedir}\Publish\1.0.0.${CCNetLabel}\XXX.exe.manifest&quot; -Install true -providerUrl ${commonServer}" />
  <exec program="C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mage.exe" commandline="-Update &quot;${project.basedir}\Publish\XXX.application&quot; -MinVersion 1.0.0.${CCNetLabel}" />
  <exec program="C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mage.exe" commandline="-Sign &quot;${project.basedir}\Publish\XXX.application&quot; -CertFile &quot;C:\Deploy\Shell_TemporaryKey.pfx&quot;" />
  
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to