Showing posts with label Team Build 2008. Show all posts
Showing posts with label Team Build 2008. Show all posts

Saturday, September 13, 2008

<TestContainer> Works With WebTest & LoadTest In Team Build 2008 With SP1

Published on: http://vstskb.net/blog/2008/09/testcontainer-works-with-webtest-loadtest-team-build-2008-with-sp1/

The new <TestContainer> item in Team Build 2008 in a great way to run tests without test metadata file (*.vsmdi).

You can specify the following to run all unit tests found in assemblies matching the pattern *.Tests.dll and even specify .LoadTest and .WebTest files as well:

<ItemGroup>
<TestContainer Include="$(Outdir)*.Tests.dll" />
<TestContainer Include="$(Outdir)WebTest1.webtest" />
<TestContainer Include="$(Outdir)LoadTest1.loadtest" />
</ItemGroup>


But if you try to run it in Team Build 2008, you will get an error like: Could not load file or assembly.



That's because the task tries to do an Assembly.LoadFrom() on whatever files you include in the <TestContainer> item. This obviously fails because .LoadTest and .WebTest are XML files, not assemblies.



This problem has been solved in TFS 2008 SP1. All you need to do is to apply the TFS SP1 patch to the build machine (If you don’t want, it’s not necessary to install TFS SP1 on TF Server to get the fix).

Thursday, June 12, 2008

Configure Team Foundation Build for an Incremental Build

A question I got today: "How can I configure my Team Build for an incremental build?".

So, it's simple.

Team Build 2005

Add the PropertyGroup definition to the end of the TFSBuild.proj file, before the closing </project> tag.

Set the following properties:

   <PropertyGroup>
<SkipClean>true</SkipClean>
<SkipInitializeWorkspace>true</SkipInitializeWorkspace>
<ForceGet>false</ForceGet>
</PropertyGroup>


 



Team Build 2008




Set IncrementalBuild property to true. To do it, add the PropertyGroup definition to the end of the TFSBuild.proj file, before the closing </project> tag.

   <PropertyGroup>
<IncrementalBuild>true</IncrementalBuild>
</PropertyGroup>


 



Source - msdn:



Team Build 2005: http://msdn.microsoft.com/en-us/library/aa833876(VS.80).aspx



Team Build 2008: http://msdn.microsoft.com/en-us/library/aa833876.aspx

Monday, April 28, 2008

How To Deploy Data Dude Project Changes using Team Foundation Build

When you want to build and deploy database projects with team build you need to edit the database project file and the Team Build file. That's because database projects store any non-default values for the TargetDatabase, TargetConnectionString, and DefaultDataPath properties in a <ProjectName>.dbproj.user file.  *.user files are not checked into version control in order to let every user use different values.

 

Step 1 - Modify build project file (team build .proj file)

Open the BuildDefinition.proj file, and at the bottom of the file, between the </ItemGroup> element and the </Project> element, add the following:

<Target Name="AfterDropBuild">
<MSBuild Projects="$(SolutionRoot)\SolutionName\ProjectName\ProjectName.dbproj"
Properties="Configuration=Default;OutDir=$(SolutionRoot)\..\binaries\Default\" Targets="Deploy" />
</Target>


 



Step 2 - modify the database project file



The target connection and database are stored in the ProjectName.dbproj.user file, which is user specific and not typically checked in to version control. You require those settings to deploy your database. Therefore, you must modify the ProjectName.dbproj file manually to specify the target connection and database.



Copy the lines that contain the definitions for the TargetDatabase and TargetConnectionString properties from the section in the ProjectName.dbproj.user file for the configuration that you want to build. These lines will resemble the following:



<TargetDatabase>MyTargetDatabaseName</TargetDatabase>
<TargetConnectionString>Data Source=ServerName\InstanceName;Integrated Security=True;Pooling=False</TargetConnectionString>


If TargetDatabase and TargetConnectionString already contain empty elements, you should overwrite those entries.



 



More into at the msdn page.

Saturday, March 29, 2008

Team Build 2008 Downloads One Level Only

TfsBuild.proj files can be located anywhere in source control in Team Build 2008. That is the reason why MS changed the default recursion type used to download files from the location of TfsBuild.proj to OneLevel only.  The meaning is that only the contents of the exact directory of TfsBuild.proj are downloaded.

Aaron Hallberg posted a solution to change this behavior.

We have to modify the following line in the TfsBuildService.exe.config on the build machine:

<add key="ConfigurationFolderRecursionType" value="Full" />


Make sure to restart the service after making the change!

Visual Studio 2008 and .NET Framework 3.5 Training Kit

Microsoft released a nice training kit (~126MB) (it's a real treasure!) for the latest technologies.

This package covers a bunch of technologies and includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2008 features and a variety of framework technologies vs2008 training kitincluding:

  • Visual Studio Tools for Office
  • Visual Studio Team System
  • Application Lifecycle Management
  • C# 3.0
  • VB 9.0
  • LINQ
  • WPF
  • WCF
  • WF
  • Silverlight
  • ASP.NET
  • AJAX
  • CardSpace
  • Mobile

 

Download here.

ALM 403: Control Your Database Lifecycle With Data Dude - Agenda

Next week I'll give a session at TechEd 2008 In Eilat, Israel. The session will introduce you how you can control your database changes and integrate it into your agile development methodology.

Do you want to control your database changes?

Do you want to test your database with unit test and even run static analysis on it?

Do you want better life and easier deployment of database schema changes to production database?

If one of your answers is YES, come to hear me.

Session Details:

  • Session Name: ALM403: Control your Database Lifecycle with Data Dude
  • Level: 400
  • Time: 8/4/2008, 9:00 AM
  • Location: Hilton Hotel, Ofir-Adom Hall

Session's Agenda:

  • What is Data Dude?
  • Data Dude Features
  • Test Your Database!
  • Build & Deploy (MSBuild & Team Build)
  • Case Study: nuconomy
  • Q & A
  • Summary

Microsoft opened up the meetings application at http://www.face2facemeeting.com/teched/. If you want to meet me and talk with me on development, WCF, LINQ, ALM or anything else - contact me! I'll be glad to see you!

Meet you there...

How To: Delete Build Agent In TFS 2008

I'm working on my TechEd demos which includes DB Projs and MSBuild + Team Build .I needed to remove one of my build agents.

To remove a build agent, navigate to to the Build Menu,  or the Build Explorer.  Click on Manage Build Agents in order to remove/edit/add a build agent.

BuildAgent

In order to use the Build Menu, you must first open the Team Explorer. Otherwise, the Manage Build Agents will not be part of the menu.

BuildAgent

Tuesday, March 25, 2008

Remove Items From ItemGroups In MSBuild

The ability to remove entries from ItemGroups is one of the new features of MSBuild 3.5.

To remove an Item from an ItemGroup in MSBuild 2.0 you would have to create a new ItemGroup from the old one and skip the Item that you needed removed.

In MSBuild 3.5 we can achieve it by using the Remove parameter.

Example:

<ItemGroup>
<Files Include="a.cs" />
<Files Include="b.cs" />
<Files Include="c.cs" />
<Files Include="d.cs" />
<Files Include="e.cs" />
<Files Include="f.cs" />
<Files Include="g.cs" />
</ItemGroup>


Some times we want to restrict some data from this group in a target. In order to do it,  we should use the Remove parameter:



<ItemGroup>
<Files Remove="a.cs" />
<Files Remove="e.cs" />
<Files Remove="f.cs" />
</ItemGroup>


Read more at msdn.

Thursday, March 13, 2008

Running Tests On TFS Build Machine

Often I asked "What do I need to install on the TFS build machine in order to run tests?"

Well, the answer is simple.

In VSTS 2005 you have to install the Tester or Suite editions on the Build Machine to run tests (even Unit Tests).

In VSTS 2008 installing the Developer Edition version is enough.

Friday, February 22, 2008

TechEd Israel 2008, I'll Talk There

I'll be attending in Eilat's Teched (6-8 April 2008) presenting about VSTS for Database Professionals and Team Build. I'm very excited...

If development is your business,  (or) you are decision maker, (or) ALM interesting you, (or) you suffering with database version management, (or) I'm interesting you... You are more than invited to come to my session... :)

Microsoft  also arranges a meetings with the lecturers - I'll be glad to see you there!

The session will demonstrate full lifecycle of a development team with SCM, including database versions management. The cycle has full build on the branch including the database. The demo will be demonstrate on TFS 2008 and VSTS 2008 Team Suite.

You can visit TechEd home page here.

Saturday, February 16, 2008

Friday, February 1, 2008

TeamBuild 2008 - SetBuildProperties Task

SetBuildProperties task is one of the new tasks that shipped in Team Build 2008. With this task we can modify properties of a BuildDetail object directly from MSBuild's TfsBuild.proj script.

The SetBuildProperties task is defined in the Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll.

The available properties are:

Property Description
LabelName Specifies the label name.
DropLocation Specifies the drop location. (shared folder to which the build account has read/write privileges)
Quality Specifies the build quality.
TestStatus Specifies the test status. Valid values are Succeeded, Failed, and Unknown.
Status Specifies the build status. Valid values are NotStarted, InProgress, Succeeded, PartiallySucceeded, Failed, and Stopped.
BuildNumber Specifies the build number.
TeamFoundationServerUrl Specifies the Team Foundation Server URL. For example, http://MyServer:8080.
BuildUri Specifies the build URI.
CompilationStatus Specifies the compilation status. Valid values are Succeeded, Failed and Unknown.

Usage:

<SetBuildProperties
BuildNumber="$(BuildNumber)"
BuildUri="$(BuildUri)"
DropLocation="$(DropLocation)" />

Thursday, January 31, 2008

Default Build Quality In Team Foundation Build 2008

I wanted to define my default build quality at one of my Team Build Types in TFS 2008. In Team Build 2005 we could define the default build quality. However, in Team Build 2008, the default build quality notion was removed.

Note: The default value for the build quality of a new build in TFS 2008 is null, not empty string.

So, how can we set the build quality? Use the SetBuildProperties task. Read about it here;

Saturday, December 8, 2007

Building VS 2008 projects with TFS 2005

When you try to build VS 2008 solutions with Team Foundation Build 2005 you get:

MSB5014 - File format version is not recognized.

I posted about it and one of the comments (by Eran Kampf) linked to Mitch Denny's approach. Customers ask me about it a lot and this is the best approach to deal with the problem.

Buck Hodges says that the best "workaround" is to upgrade to TFS 2008. But not all of you will upgrade soon to 2008. For you, Mitch's approach is the best.

Technorati Tags: ,

Sunday, December 2, 2007

Team Foundation Build 2008 New Features Video

There's a great new video on MSDN by Richard Hundhausen introducing the new features in Team Foundation Build 2008: How Do I: Learn the New Features and Capabilities of Team Foundation Build 2008?

The video covers the major new features and provides a great introduction to the product.