Thanks Craig. That works for me -Snehal
On Apr 7, 8:07 pm, "Craig Sutherland" <[email protected]> wrote: > The parameters cannot be directly accessed outside of CC.NET. However you > can pass arguments into your script and then use them. > > For MSBuild: > <msbuild> > <!-- Rest of the configuration --> > <buildArgs>/p:PreviousVersion=$[PreviousVersion]</buildArgs> > </msbuild> > > For Nant: > <nant> > <!-- Rest of the configuration --> > <buildArgs>-D:PreviousVersion=$[PreviousVersion]</buildArgs> > </nant> > > Once the parameter is in the script it can be used like any other parameter, > e.g. using $(PreviousVersion) or ${PreviousVersion} (depending on which > script engine you are using). > > Craig > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > > Behalf Of SMS > Sent: Thursday, 8 April 2010 11:13 a.m. > To: ccnet-user > Subject: [ccnet-user] Not able to access dynamic parameters. > > I have added dynamic parameters to one of my recent projects in > ccnet.config. I call my build file named default.proj from msbuild > task. When I try to access dynamic parameters in default.proj, it > returns no value. > > Am I accessing the parameters correctly in default.proj or they cannot > be accessed outside ccnet.config file? > > SNIPPET FROM CCNET.CONFIG > > <parameters> > <textParameter> > <name>PreviousVersion</name> > <display>Previous Version</display> > <description>What is previous version?</description> > <required>true</required> > </textParameter> > <parameters> > > SNIPPET FROM DEFAULT.PROJ FILE > > <Target> > <Message Text="PreviousVersion: $[PreviousVersion]" /> > <Error Text="The PreviousVersion is required" Condition="!Exists($ > [PreviousVersion])" /> > </Target> > > ERROR: > > <message level="normal"><![CDATA[PreviousVersion: $ > [PreviousVersion]]]></message> > <error code="MSB4110" file="C:\BackEnd_BuildProjects\BUILD_SYSTEM\CCNET > \MSBUILD_Files\DMSInstaller_Database\BuildDBInstaller_exe.proj" > line="33" column="51" timeStamp="04/07/2010 17:49:51"><! > [CDATA[Expected a property at position 9 in condition "!Exists($ > [PreviousVersion])". Did you forget the opening parenthesis after the > '$'? To use a literal '$', use '%24' instead.]]></error> > > -- > To unsubscribe, reply using "remove me" as the subject.- Hide quoted text - > > - Show quoted text -
