Skip to main content

Posts

Showing posts with the label automation

Build with .NET 4.0 in Team Foundation Server

In order to force your Team Build to use the .NET assemblies and tools you'll need to make the following change. Change the value in the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\tfsbuildservice.exe.config From add key="MSBuildPath" value="" to add key="MSBuildPath" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319" TFS service must be restarted afterwards "Visual Studio Team Foundation Build" http://blogs.infosupport.com/blogs/martijnb/archive/2010/05/04/building-visual-studio-2010-solutions-using-team-build-2008.aspx

Automated update of AssemblyVersion and AssemblyFileVersion

Like so many others I wanted to update the Version of all of my assemblies with one version value but I could not find the solution I wanted, hence I've written my own, see the source code below. This implementation fits my own problem, a build script which gets all our codebase sourcecode from SourceSafe, builds all the projects and then labels all the sourecode with a single label passed in by the builder at command-line. This implementation takes either 1 or 2 arguments. If only 1 is supplied it will do a check for a valid Version value i.e. the version must be of the format 1.0.0.0 and the third value must be less than 65535 (This is a .NET requirement, the assembly would not build if the number is above 65535, see here for more ). If 2 arguments are supplied it will do all that step 1 does and also will set the version to AssemblyVersion and AssemblyFileVersion in all AssemblyInfo.cs files under the directory specified (and it's subdirectories). e.g. here's how I cal...