Hi,
the tasks below do not seem like any of the standard tasks that come
out of the box:
http://confluence.public.thoughtworks.org/display/CCNET/Task+And+Publisher+Blocks

Creating directories, copying files and running other apps are usually
done using the <exec> task with the cmd.exe as executable. Please see:
http://confluence.public.thoughtworks.org/display/CCNET/Executable+Task

Here is one example that creates a directory called "deploy" at the
same level as your working directory:
        <exec>
            <executable>C:\Windows\system32\cmd.exe</executable>
            <buildArgs>/C md ..\deploy</buildArgs>
        </exec>

Here is another example on how to delete specific files in the
directory created above:
        <exec>
                <description>Delete environment specific config 
files</description>
                <executable>C:\Windows\system32\cmd.exe</executable>
                <buildArgs>/C del ..\deploy\WebServer1\web.config 
..\deploy\WebEditor
\appSettings.config</buildArgs>
        </exec>

Here is an example on how to use robocopy.exe to copy files:
        <exec>
                <description>Copy configuration files to 
WebServer1</description>
                <executable>robocopy.exe</executable>
                <buildArgs>configuration\servers\Test\WebServer1 ..\deploy
\WebServer1 *.config /NFL /R:1 /W:1 /ZB /XA:SHEO</buildArgs>
                <successExitCodes>0,1,2,3,4</successExitCodes>
        </exec>

Here is an example on how to use 7zip to package the files into a .zip
archive:
        <exec executable="C:\Program Files\7-Zip\7z.exe">
                <description>Create zip file for deployment to WebServer1</
description>
                <buildArgs>
                        u -tzip C:\Build\myproject\deploy\WebServer1.zip -w 
C:\Build
\myproject\deploy\WebServer1
                </buildArgs>
        </exec>

Best Regards,
Steve Celius


On Jan 4, 9:45 am, vikky <[email protected]> wrote:
> Hi,
>
> I want to copy select number of files after msbuild task and was try
> to write code for that in CCNET.CONFIG.After copying, i need to run
> the executable.
>
> the code i was using for copy is
>
> <Copy  SourceFiles="D:\Builds\Temp\1.0.11.14\Test\Configs\App.config"
>                DestinationFiles="C:\Configs\App.config"/>
> <copy file="D:\Builds\Temp\1.0.11.14\Test\Configs\App.config"
> tofile="C:\Configs\App.config" overwrite="true"/>
>       <mkdir dir="C:\check\Release"/>
>       <copy todir="C:\check\Release">
>         <fileset dir="D:\Builds\Temp\1.0.11.14\Test"></
> fileset>
>       </copy>
>
> for executable running i am using the below code.
>
> <executable>D:\Builds\Temp\Installers\Dev\BtClickOnceSetup.exe</
> executable>
>     <executable>D:\Builds\Temp\Installers\Dev\Server Configuration Tool
> \BT.SaaS.AgentDesktop.BTServerDeploymentTool.exe</executable>
>     <executable>C:\windows\system32\iisreset.exe</executable>
>
> I am getting this error for executable....
>
> ThoughtWorks.CruiseControl.Core.Config.ConfigurationException: Unused
> node detected: <executable>D:\Builds\Temp\Installers\Dev
> \BtClickOnceSetup.exe</executable>
>    at
> ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.DefaultErrorProcesser.ProcessError(String
> message)
>    at
> ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.<>c__DisplayClass1.<Read>b__0(InvalidNodeEventArgs
> args)
>    at
> Exortech.NetReflector.InvalidNodeEventHandler.Invoke(InvalidNodeEventArgs
> args)
>    at
> Exortech.NetReflector.NetReflectorTypeTable.OnInvalidNode(InvalidNodeEventArgs
> args)
>    at
> Exortech.NetReflector.XmlTypeSerialiser.HandleUnusedNode(NetReflectorTypeTable
> table, XmlNode orphan)
>
> I am getting this error for copying....
>
> Exortech.NetReflector.NetReflectorException: Unable to load array item
> 'Copy' - Cannot convert from type System.String to
> ThoughtWorks.CruiseControl.Core.ITask for object with value: ""
> Xml: <Copy SourceFiles="D:\Builds\Temp\1.0.11.14\Test\Configs
> \App.config" DestinationFiles="C:\Configs\App.config" /> --->
> Exortech.NetReflector.NetReflectorConverterException: Cannot convert
> from type System.String to ThoughtWorks.CruiseControl.Core.ITask for
> object with value: "" ---> System.NotSupportedException:
> ExpandableObjectConverter cannot convert from System.String.
>    at
> System.ComponentModel.TypeConverter.GetConvertFromException(Object
> value)
>    at
> System.ComponentModel.TypeConverter.ConvertFrom(ITypeDescriptorContext
> context, CultureInfo culture, Object value)
>    at System.ComponentModel.TypeConverter.ConvertFrom(Object value)
>    at Exortech.NetReflector.Util.ReflectorTypeConverter.Convert(Type
> to, Object from)
>    --- End of inner exception stack trace ---
>    at Exortech.NetReflector.Util.ReflectorTypeConverter.Convert(Type
> to, Object from)
>    at Exortech.NetReflector.XmlArraySerialiser.Read(XmlNode node, Type
> instanceType, NetReflectorTypeTable table)
>    --- End of inner exception stack trace ---
>    at Exortech.NetReflector.XmlArraySerialiser.Read(XmlNode node, Type
> instanceType, NetReflectorTypeTable table)
>    at Exortech.NetReflector.XmlMemberSerialiser.Read(XmlNode node,
> NetReflectorTypeTable table)
>    at Exortech.NetReflector.XmlTypeSerialiser.ReadMembers(XmlNode
> node, Object instance, NetReflectorTypeTable table)
>    at Exortech.NetReflector.XmlTypeSerialiser.Read(XmlNode node,
> NetReflectorTypeTable table)
>    at Exortech.NetReflector.NetReflectorReader.Read(XmlNode node)
>    at
> ThoughtWorks.CruiseControl.Core.Config.NetReflectorConfigurationReader.Read(XmlDocument
> document, IConfigurationErrorProcesser errorProcesser)
>    --- End of inner exception stack trace ---
>
> Can you please help in this...... p-lease send the copy to
>
> Thanks,
> Phanivikranth

Reply via email to