0

I need to pass changeset number from ccnet to msbuild script in build process.

When ccnet triggering new build,he get a changeset number, so

I need to take that changeset number and pass it to the msbuild script.

This msbuild script involves some custom tool, which need this changeset number.

Thanks.

mirakl
  • 167
  • 3
  • 14

1 Answers1

0

You can create a property for the changeset number like this:

<PropertyGroup>
   <ChangesetNumber>SomeDefaultValue</ChangesetNumber>
</PropertyGroup>

and pass it through the commandline to your msbuild like this:

msbuild yourprojectname /p:ChangesetNumber=yourValue

In your projectfile you would then reference this:

<Target Name="YourCustomTarget">
    <YourCustomTask argumentForChangesetNumber="$(ChangesetNumber)" />
</Target>
Sebastian P.R. Gingter
  • 5,955
  • 3
  • 31
  • 73
  • But where msbuild get current changeset number ? "msbuild yourprojectname /p:ChangesetNumber=yourValue". I mean when ccnet triggering for new build , changeset number need to get into "yourvalue" string, how ? – mirakl Aug 02 '11 at 13:11
  • You said CruiseControl gets this changeset number. You just have to configure CC to pass it to the msbuild call, but thats CC specific and I'm more into the msbuild side ;-) – Sebastian P.R. Gingter Aug 02 '11 at 13:21