Category Archives: TFS

MSBuild notes

To examine what types of values the well-known metadata returns, take a look at the example below:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <PrjFile Include="Helloworld.proj" />
  </ItemGroup>
  <Target Name="Well known metadata">
    <Message Text="%40(PrjFile->'%25(Fullpath)'):@(PrjFile->'%(Fullpath)')"/>
    <Message Text="%40(PrjFile->'%25(Rootdir)'):@(PrjFile->'%(Rootdir)')"/>
    <Message Text="%40(PrjFile->'%25(Filename)'):@(PrjFile->'%(Filename)')"/>
    <Message Text="%40(PrjFile->'%25(Extension)'):@(PrjFile->'%(Extension)')"/>
    <Message Text="%40(PrjFile->'%25(RelativeDir)'):@(PrjFile->'%(RelativeDir)')"/>
    <Message Text="%40(PrjFile->'%25(Directory)'):@(PrjFile->'%(Directory)')"/>
    <Message Text="%40(PrjFile->'%25(RecursiveDir)'):@(PrjFile->'%(RecursiveDir)')"/>
    <Message Text="%40(PrjFile->'%25(Identity)'):@(PrjFile->'%(Identity)')"/>
    <Message Text="%40(PrjFile->'%25(ModifiedTime)'):@(PrjFile->'%(ModifiedTime)')"/>
    <Message Text="%40(PrjFile->'%25(CreatedTime)'):@(PrjFile->'%(CreatedTime)')"/>
    <Message Text="%40(PrjFile->'%25(AccessedTime)'):@(PrjFile->'%(AccessedTime)')"/>
  </Target>
</Project>
Share

TFS Commands Tips and Tricks part 1

Below are some TFS commands and tips that might be useful:

Delete a build:

tfsbuild.exe delete http://:8080 “” “” /noprompt

Delete a label:

tf label /server:http://:8080 @ /delete

Delete a TeamProject (be careful):

TfsDeleteProject.exe /q /server: /force

Tip: The reporting site is not properly deleted! Go to http://servername/Reports; click on “Show details”; check the teamproject and press delete.

Check your latest warehouse run:
In the database TfsWarehouse a table dbo._Warehouseconfigexists. Check the row with IDLastProcessTimeStamp

Stop a running build (TFS2005):
Go to your buildserver and navigate to the directory Program filesMicrosoft Visual Studio 8Common7IDE; start the command:

tfsbuild.exe stop “>teamproject>” “”

You can remove the build with

tfsbuild.exe delete “” “”

Deleting the TeamProject does not delete the Report or the WSS site (location on wss server is http://localhost/sites/[TEAMPROJECTNAME]. You can delete this components in their respective programs.

All sharepoint sites defined on the server can be retrieved from the SQL table: STS_Config_TFS.dbo.sites

Share

Team Foundation Server Single Server installation

This is a very basic Team Foundation install. It is a Single Server install; Application Tier and Database Tier all on a single machine.

  1. Install Windows 2003 SE including IIS / ASP.NET.
  2. Install SQL Server 2005 Enterprise Edition:
    1. On the Components to Install page, select the following components, and then click Advanced; select:
      SQL Server Database Services.
      Analysis Services.
      Reporting Services.
      Integration Services.
      Workstation components, Books Online, and development tools.
    2. On the Feature Selection page (after pressing Advanced), expand the following nodes and specify the following options.
    3. Under Database Services, click the icon for Replication and select Entire feature will be unavailable.
    4. On the Instance Name page, select Default instance, and then click Next.
    5. In “Start services at the end of setup”, select all services: SQL Server, SQL Server Agent, Analysis Services, Reporting Services, and SQL Browser,and then click Next.
    6. On the Authentication Mode page, select Windows Authentication Mode, and then click Next.
    7. On the Collation Settings page, select the appropriate collation for your language, and then click Next.
    8. On the Report Server Installation Options page, select Install the default configuration, and then click Next.
    9. On the Error and Usage Report Settings page, you can optionally select Automatically send Error reports for SQL Server 2005 to Microsoft or your corporate error reporting server and Automatically send Feature Usage data for SQL Server 2005 to Microsoft, and then click Next.
    10. On the Ready to Install page, you can review the list of components to be installed, and then click Install.
  3. Install the latest Service Pack for SQL Server.
  4. Install the SqlServerKB update located on the TFS cd in the root folder.
  5. Installing the Microsoft .NET Framework 2.0 Hotfix located on the TFS cd in the KB913393 folder.
  6. Installing Microsoft Windows SharePoint Services (http://go.microsoft.com/fwlink/?linkid=55087)
    CAUTION Install for Server Farm!
  7. Create users:
    ?TFSREPORTS
    ?TFSSERVICE
  8. Ensure IIS is installed on your server.
  9. Install Team Foundation Server itself.
  10. Install the Build component of TFS in the Build directory on the cd (use the TFSSERVICE account for the installation).
  11. Install the Team Explorer on your TFS/SQL machine.
  12. Start Visual Studio 2005.
  13. Choose Tools -> Connect to Team Foundation Server…
  14. Give the TFSSERVICE user access to the Team Foundation server:
  15. Right-click the servername in the Team explorer.
  16. Select “Team Foundation Server settings”.
  17. Select “Group Member Ship…”.
  18. Select the group “SERVERTeam Foundation Licensed Users”.
  19. Select Properties.
  20. Select in the Add member group “Windows user or group”.
  21. Add the TFSSERVICE user. (see also http://blogs.msdn.com/vstsue/articles/556043.aspx).
  22. Create a share on the buildserver e.g. BuildDrop.
  23. Create a build directory on the buildserver e.g. BuildDir.
  24. Create a team project with a solution in it. Create a team build type and build it.

That’s all

Share

Client thinks TFS server is offline

The TFS client keeps track of the TFS Server status in the registry. When you try to (re)bind a solution to source control and there are no available servers; open up the registry and navigate to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio9.0TeamFoundationServers

The value for “Offline” should be 0; now restart visual studio and bind the solution to source control.

Share

CreateItem in MSBuild

<!-- Signing step -->
<Target Name="MSISigningStep">

<!-- Select all MSI in the $(OutDir) for signing -->
<CreateItem Include="$(OutDir)***.msi">
<Output ItemName="MSIFilesToSign" TaskParameter="Include" />
</CreateItem>

<Message Text="No MSI files found for signing."
Condition="'@(MSIFilesToSing)' == '' "/>

<!-- Execute the sign command if any files found -->
<Exec
Command=""C:Program FilesMicrosoft SDKsWindowsv6.0Abinsigntool.exe"" +
"sign "%(MSIFilesToSign.Fullpath)""
Condition="'@(MSIFilesToSing)' != '' "/>

</Target>
Share