This project is read-only.

Equivalent for FreeToDev.MSBuild.TFSTasks.SetBuildNumber

Apr 21, 2009 at 10:04 AM


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

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

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


Apr 21, 2009 at 12:42 PM

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:!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: (

Jul 23, 2009 at 9:12 AM

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


Jul 23, 2009 at 9:56 AM

You should simply use

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

then you will have all tasks available to you.


Jul 23, 2009 at 10: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.

Jul 23, 2009 at 11:03 AM

Yes, install the MSI on your build server.