MSDN Archive Home
Help and FAQs
Team Foundation Server 2010 Sample Warehouse Adapter - CSharp Assembly Churn
All Resource Updates
Change History (all pages)
Team Foundation Server 2010 Sample Warehouse Adapter - CSharp Assembly Code Churn
This sample demonstrates a basic implementation of a Team Foundation Server 2010 Warehouse Adapter.
This Adapter adds CSharp Assembly to File mappings into the Warehouse primarily for use with the out-of-box code churn metrics. It is not intended to be a production Adapter (there are several limitations to the approach) but instead demonstrates the general approach for those wishing to customize the TFS Warehouse.
Download and install (see below)
Build and run the sample (see below)
Visual Studio 2010
Team Foundation Server 2010
Download the zip file associated with the sample
Unzip the sample to your machine
Building and running the sample
Open the .sln in Visual Studio 2010 (double click to open)
Resolve the Team Foundation Server assembly dependencies
Micorosft.AnalysisServices - Location: GAC on computer with Microsoft SQL Server Analysis Services installed or download "Microsoft SQL Server 2005 Management Objects Collection" from http://social.msdn.microsoft.com/forums/en-US/sqlanalysisservices/thread/c5ff4c79-861a-45a2-b35b-97d83b3f1533
Build the Solution
Install and configure the custom Adapter
Follow the instructions in the ManageCustomWarehouseJob.cs file in the SetupCSharpCodeChurnAdapter Project.
AdapterConstants.cs - Some constants (i.e. table names) used throughtout the adapter.
AnalysisDatabase.cs - Wrapper class for creating Analysis DB schema.
ChangesetProcessor.cs - Main class handling ETL for assembly and assembly mappings.
CSharpAssemblyCodeChurnSampleAdapter.cs - The main adapter. This is the object loaded by TFS and controls ETL and schema generation.
ServicingVersion.cs - Class to check schema version stamp in Warehouse and Analysis DB.
WarehouseDatabase.cs - Simple wrapper class on top of the Warehouse for creating schema and performing ETL.
WarehouseJobService.cs - Simple wrapper on the Job Service to queue the Warehouse Analysis Full Process job.
WarehouseTable.cs - Simple wrapper on a Warehouse table. See WarehouseDatabase.cs.
WarehouseTables.cs - Simple wrapper on a Warehouse table - strongly typed tables related to this adaper. See WarehouseDatabase.cs.
CreateCSharpAssemblyAddUpdateProcedure.sql - TQL to Add CSharp Assembly entries.
CreateCSharpAssemblyDestroyProcedure.sql - TSQL to Destroy CSharp Assembly entries.
CreateCSharpAssemblyTable.sql - TSQL to Create the CSharp Assembly table.
CreateCSharpAssemblyToFilesMappingAddUpdateProcedure.sql - TSQL to Add entries to the CSharp Assembly to File mapping.
CreateCSharpAssemblyToFilesMappingTable.sql - TSQL to Create the CSharp Assembly to File mapping table.
CreateCustomSqlMessages.sql - TSQL to add custom error messages to SQL.
ManageCustomWarehouseJob.cs - Simple console application to create and schedule the Adapter as a Warehouse job.
WarehouseJobManager.cs - Wrapper on top of the TFS Job Server to help create/schedule Warehouse jobs.
If you have any additional resources you would like to share with the customer, add it here.
**Delete the following note before publishing **
This resource page is currently in setup mode and only available to coordinators and developers. Once you have finished setting up your resource page you can publish it to make it available to all MSDN Code Gallery visitors.
To get your Resource Page ready to publish, you should do the following:
Make any changes to the details of your resource page
Here you can enable or disable functions of your resource page. You might want to turn on the Issue Tracker to allow users to provide feedback on your resource, or if you have a resource that does not involve a code sample, you may want to turn off the Releases tab.
Make sure your resource page description is detailed enough to let people search for your resource.
Add your code sample or other resources to the resource page
If you’re uploading code, go to the Releases tab and create a new release to house your code. Creating a release allows you to have the license properly displayed when people download your code, as well as provides a download count.
Edit your Wiki page to attach any resources you may have that are not source code.
If you want to let someone see your resource page before it is published, go to the People tab and add them to your resource page
This will let you add other team members who may be contributing to your resource, or just show it off and get feedback from someone you trust.
Tag your resource page with descriptive tags to make it easier for people to find your resources when browsing the gallery.
Publish your resource page so it becomes visible to everyone!
Additional information on starting a new resource page is available here:
Resource Page Startup Guide
Apr 1 2010 at 3:23 PM
, version 4
Sign in to add a comment
Fri Apr 2 2010 at 7:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.