Equivalent for FreeToDev.MSBuild.TFSTasks.SetBuildNumber

Apr 21, 2009 at 9:04 AM

Hello,

I am using the "FreeToDev.MSBuild.TFSTasks.SetBuildNumber" task of FreeToDev.MSBuild.Tasks.dll assembly for stamping FileVersion in my assembly.

Ex:
<ItemGroup>
    <FilesToVersion Include="$(SolutionRoot)\**\AssemblyInfo.cs" />
  </ItemGroup>

Now I have downloaded the MSBuild Extension pack. So what is the equivalent task that I can use for Stamping Fileversion during my Build.

Thanks.

Coordinator
Apr 21, 2009 at 11:42 AM
Hi

This functionality is now in the TfsVersion Class

Valid TaskActions are:

GetVersion (Required: TfsBuildNumber, Major, Minor, VersionFormat Optional:PaddingCount, PaddingDigit, StartDate, DateFormat, BuildName, Delimiter, Build, Revision, VersionTemplateFormat, CombineBuildAndRevisionOutput: Version, Major, Minor, Build, Revision)

Please Note: The output of GetVersion should not be used to change the $(BuildNumber). For guidance, see: http://freetodev.spaces.live.com/blog/cns!EC3C8F2028D842D5!404.entry

SetVersion (Required: Version, Files Optional: TextEncoding, SetAssemblyVersion, AssemblyVersion, SetAssemblyFileVersion, ForceSetVersion

Remote Execution Support: NA

Namespace:  MSBuild.ExtensionPack.VisualStudio
Assembly:  MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 3.5.0.0 (3.5.2.0)


Jul 23, 2009 at 8:12 AM

Shall I refer MSBuild.ExtensionPack.dll or MSBuild.ExtensionPack.Tfs.dll in my .proj file?

Thanks.

Coordinator
Jul 23, 2009 at 8:56 AM

You should simply use

<Import Project="$(MSBuildExtensionsPath)\ExtensionPack\MSBuild.ExtensionPack.tasks"/>

then you will have all tasks available to you.

Mike

Jul 23, 2009 at 9:25 AM

Thanks for a quick reply.
So for this I need to install the "MSBuild Extension Pack.msi" in my Build Machinie? and start the Import? or do I need to do anyother settings too. Please advice.

Coordinator
Jul 23, 2009 at 10:03 AM

Yes, install the MSI on your build server.