What you need to use Hosted TFS 2012 (Team Foundation Service)


You can connect to the Team Foundation Service Preview from a number of applications as well as visiting your account URL at tfspreview.com. In the following post we talk about the client software necessary if you want to connect your development environment to your new Team Foundation Server in the cloud.

  • Visual Studio 2010 SP1 or Microsoft Test Manager 2010 SP1
    To connect and authenticate with the Team Foundation Service Preview you need to install the compatibility GDR.
    Note: You must have Service Pack 1 for Visual Studio 2010 installed before installing the GDR above.
  • Eclipse
    For Eclipse 3.5 and higher (or IDE’s based on those versions of Eclipse) on any operating system (including Mac, Linux as well as Windows) you can install the TFS plug-in for Eclipse which comes as part of the Team Explorer Everywhere 11 Beta.
  • Build Server (Build Controller and Agent)
    To have a build server that talks to the Team Foundation Service Preview, you need to install the Build Service from the latest Team Foundation Server 11 Beta.
  • Visual Studio 11 Beta
    Also, don’t forget that the Visual Studio 11 Beta has all the bits built in to be able to make use of your Team Foundation Service Preview account. Not only that, some of the great new features of the Team Foundation Service Preview will only light up from the newest version Visual Studio. We are keen to get your feedback on this beta release so download it and give it a go from a test machine and let us know what you think.

Links are now pointing to the beta, you need to use the RC


TFS 2012 for FREE


Brian Harry, Technical Fellow TFS, recently announced that with TFS “11” we’ll be introducing a new version of TFS, called Team Foundation Server Express, that includes the core developer features:

  • Source Code Control
  • Work Item Tracking
  • Build Automation
  • Agile Taskboard
  • and more…

The best news is that it’s FREE for individuals and teams of up to 5 users. Read more about Team Foundation Server “11” Express in Brian Harry’s blog post entitled Coming Soon: TFS Express

Download the Visual Studio “11” Beta and Team Foundation Server “11” Beta here

Troubleshooting TFS 2010 reports & Warehouse


Background: Physical Architecture of TFS Reporting

Each TFS component maintains its own set of transaction databases. This includes work items, source control, tests, bugs, and Team Build. This data is aggregated into a relational database. The data is then placed in an Online Analytical Processing (OLAP) cube to support trend-based reporting and more advanced data analysis.

The TfsWarehouse relational database is a data warehouse designed to be used for data querying rather than transactions. Data is transferred from the various TFS databases, which are optimized for transaction processing, into this warehouse for reporting purposes. The warehouse is not the primary reporting store, but you can use it to build reports. The TfsReportDS data source points to the relational database. The Team System Data Warehouse OLAP Cube is an OLAP database that is accessed through SQL Server Analysis Services. The cube is useful for reports that provide data analysis of trends such as ‘how many bugs closed this month versus last month?’ The TfsOlapReportDS data source points to the Team System Data Warehouse OLAP cube in the analysis services database.

10 Steps to trouble shoot TFS Reporting

1. On the TFS Application tier server, open an Administrative Command Prompt

2. Run the following command: Net Stop TFSJobAgent

3. Once this completes, run the following command to restart the TFSJobAgent: Net Start TFSJobAgent

4. Open the TFS Administration console, and select the Reporting Node

5. Click the Start Rebuild link to rebuild the warehouse. Refresh this page until it displays “Configured and Jobs Enabled”

6. Open a web browser and navigate to the warehousecontrolservice.asmx page at:


7. Click ProcessWarehouse, then click Invoke on the subsequent page. This should return True.

8. Return to the WarehouseControlService.asmx page, then click ProcessAnalysisDatabase.

9. Enter Full for the processingType, then click Invoke, this should also return True.

10. Return to the WarehouseControlService.asmx page and click GetProcessingStatus, this should return the processing status page

with the current processing results. It should indicate Full Analysis processing is occurring. Refresh this page until the status

(ResultMessage) of the “Full Analysis Database Sync” indicates “Succeeded”


Refresh TFS Warehouse, Cube and Reports on demand

By default, TFS will process it’s Data Warehouse and Analysis Services Cube (and thus update the data for the reports) every 2 hours. Be careful with changing it to lower values than every hour:


If you reduce the interval to less than the default of two hours (7200 seconds), processing of the data warehouse will consume server resources more frequently. Depending on the volume of data that your deployment has to process, you may want to reduce the interval to one hour (3600 seconds) or increase it to more than two hours. [Source: MSDN]

Alternatively you can use this small command line utility from Neno Loje:


tfsrefreshwarehouse.exe /server:http://servername:8080/tfs [/full] [/status]

Manually process the TFS Warehouse and Cube

Using just the /status paramter returns useful information about cube processing:

Using /status shows the last and next scheduled sync times

(Note: The user needs to have the ‘Administer Warehouse‘ permission in TFS)

Download the tool from here: TfsRefreshWarehouse.exe (.ZIP, 12,8 KB)

using TFS for beginners – common issues


Below are few issues which I guess one would run into on their first usage of TFS & Team Explorer, some of them are fixed in TFS 2010 and some other in TFS 11 Smiley

1) Permanently deleting Dummy Projects: After playing around for a while there would few dummy Team Projects created. By default TFS uses a soft delete. For permanent (hard) delete one can use tf command line utility with destroy option.

Note if you have deleted a project already you need to undelete it & check in pending changes. Destroy doesn’t work on deleted projects. Also the folder you are trying to delete should be mapped to a workspace (File -> Source Control ->Workspaces…)

E.g. tf destroy $/YourProjectName/SubFolder/… /collection:http://myserver:8080/tfs/defaultcollection (for other options check out tf destroy /?)

2) Logging in as a different user: By default VS.NET would ask you credentials to connect to TFS every time you run it. You can avoid it by caching required credentials. To cache your credentials go to Control Panel -> User Accounts -> Manage your network password (left column) -> Click Add to add the required details. Once added VS.NET won’t trouble you for credentials.

3) Deleting a workspace: Workspace belongs to a owner (authenticated user by TFS). Let’s say you have logged in as Admin & set your working folder to C:\WorkingFolder. Now you want to log on TFS as local user (without admin rights) & use the same mapped path (C:\WorkingFolder). TFS at this level would complain Admin is already using that location, hence you can’t use it. In order to remove workspace created by Admin you again need to fallback on tf utility.

E.g. tf workspace /delete MyWorkspace;MyDomain\Admin /server:http://MyTFS:8080/tfs

4) Automatic Check Out – not working: If you go to VS.NET Tools -> Options -> Source Control -> Environment, you will see 2 drop downs there. There is one which reads Editing – Check Out Automatically. What this means is when you have a opened project & you edit files using Solution Explorer those would be checked out automatically. But sometimes you won’t find it working. A possible reason, your solution is not binded to source control. To regain the bindings click on File -> Source Control -> Change Source Control (N.B. At this point of time Source Control explorer should be closed). There you will a list of your projects & solutions. Select them & click on bind button on the tool bar window. Things would start working now as expected. When you bind the TFS project and solution by default they will be checked out and 2 additional files vspscc and vssscc would be created. You need to check-in the project (.csproj) / solution (.sln) files to avoid rebinding of the solution next time. There isn’t a need to include vspscc and vssscc inside TFS.

5) Unlocking a file: 2 steps – find the workspace that belongs to the user and then execute undo command by specifying workspace, user account and file path –
tf workspaces /owner:domain\userid –you would get these parameters from the file lock message
tf undo /workspace:workspacename;domain\userid $/filePath –filePath you can copy it from File Properties in Source Control

6) Permanently deleting a WorkItem: There is quite a possibility there your team could create dummy workitems in process of getting familiar with the system. At times it might be important to cleam this items so that they don’t impact your charts and reports. Below is the command you can use to delete a workitem permanently.

witadmin destroywi /collection:CollectionURL /id:id [/noprompt]

TFS 11 improvements for development productivity (Merge enhancements & Version Control Model )


After meeting Brian Harry in München @ALMDays , we have talked about changes in TFS11 in the day by day work for developers, check some news here  about Version Control Model Enhancements



and about  Merge enhancements in TFS 11


A new diff/merge experience – The one has been shipping for the past 5 years is the original SourceSafe diff/merge tools – built while we were One Tree Software circa 1994.  It had been enhanced over the years to support globalization, Unicode, etc but it was, in essence, the same diff tool.  Well not any more, it’s gone!  Now it is a new diff/merge experience based on the VS editor.  And before you say “but wait, I really love kdiff!”, don’t worry – it’s still configurable and you can use any tool you like but the out of the box one is now WAY better.  How is it better you say?

  • It supports both “inline” and “side by side” modes and you can choose the one you like best.
  • It has syntax highlighting (as supported in the VS editor).
  • Individual changes within a line are highlighted.
  • When both diffing and merging, you can edit with the full power of the VS editor, including undo, Intellisense and everything!
  • Diff has a nice “mini-map”.
  • You can now take more actions from the views (like history, etc).
  • Diff uses the new provisional tab feature in VS to avoid cluttering your document well.
  • An improved way of manually selecting merge resolutions.
  • An interactive way of turning on/off ignoring whitespace.

Here are some screen shots to demonstrate.  You can observe many of the points I made above:

Side by side diff view in the provisional tab (all the way to the right) with a change highlighting gutter on the left, in line change highlighting, VS style class/method navigation, syntax coloring and more.  Yes the text with the file names above the source looks dumb – that’s a bug.


Same diff using inline mode:


And here are some screenshots of the merge experience.  I’ve included all three of the views you can choose from:


TFS Error : Workspace Already Exists Error


  If you ever have the joyous experience by migration steps of TFS environment and  Visual Studio 2010 and you are using Team Foundation Server as your source control system, you may encounter a workspace error message akin to “workspace already exists on computer”.

This is sometimes due to the cached settings on your system. To clean this up, try the following:

SET TFAppData=%USERPROFILE%\Local Settings\Application Data\Microsoft\Team Foundation

IF EXIST "%TFAppData%\3.0\Cache" rd /s /q "%AppDataTF%\3.0\Cache" &gt; NUL
tf workspaces /s:http://mytfserver:8080/

Note: “tf.exe” must be in your path.  If not, just add the full path to the .exe.  Also, this currently shows cache paths for Visual Studio 2005, 2008, and 2010

Enterprise Library v5 & Contrib


A couple of days ago, the EntLibContrib project has reached an important milestone – porting a big chunk of the EntLibContrib codebase to be compatible with EntLib v5. They released the binaries via NuGet (search for ‘entlibcontrib’ or ‘entlib’). Here’s what this October 2011 release includes:

  • EntLibContrib 5.0 – Oracle ODP.NET Data Provider
    • allows to use the Oracle Data Provider for .NET (ODP.NET) with the Microsoft Enterprise Library Data Access Application Block (DAAB).
  • EntLibContrib 5.0 – MySql Data Provider
    • allows to use the MySql .NET Connector with the Microsoft Enterprise Library Data Access Application Block (DAAB).
  • EntLibContrib 5.0 – Query Application Block
    • provides a common interface to query and update data stored in a DB, XML file or Web/WCF service.
  • EntLibContrib 5.0 – Query Application Block Database Extensions
    • allow to use the Query Application Block with the Microsoft Enterprise Library Data Access Application Block.
  • EntLibContrib 5.0 – Validation Application Block Extensions
    • provide additional validators, design-time enhancements and some other features.
  • EntLibContrib 5.0 – Logging Application Block Extensions
    • provide additional trace listeners, log entries parsing support and some other features.
  • EntLibContrib 5.0 – Exception Handling Application Block Extensions
    • provide additional exception handlers.
  • EntLibContrib 5.0 – Policy Injection Application Block Extensions
    • provide additional PIAB call handlers.
  • EntLibContrib 5.0 – Common Extensions
    • extend the Microsoft Enterprise Library Common Infrastructure by providing new configuration element classes (TypeConfigurationElement and AnonymousConfigurationElement) that help dealing with design-time support for your custom providers.
  • EntLibContrib 5.0 – Source Code
    • this package includes a zip file with the source code of all the extensions and the additional blocks of EntLibContrib v5. This source code can also be used in combination with the PDBs for debugging purpose.

The following packages are planned to be subsequently released in November:

  • EntLibContrib 5.0 – Castle Windsor Configuration Support
    • This Castle Windsor IContainerConfigurator implementation will allow EntLib to use Windsor as the container (instead of Unity).
  • EntLibContrib 5.0 – Autofac Configuration Support
    • This Autofac IContainerConfigurator implementation will allow EntLib to use Autofac as the container (instead of Unity).
  • Additional Data Providers for DB2, PostgreSQL, SQLite, and SqlEx
  • EntLibContrib 5.0 – Resource Application Block
    • a full application block of configurable providers for Globalization and Localization, complete with configuration console designer, Unity support, group policy support and instrumentation.
  • EntLibContrib 5.0 – Mapping Application Block
    • complements the Query Application Block (QAB) and manages the data transfer objects used by the QAB and mapping them to and from fully typed domain objects.

Congratulations to the EntLibContrib community on this release! It’s great to see such work coming from community enthusiasts. If you get to use these extensions and benefit from them, make sure to send your kudos to the contributors. And if you build your own extensions and feel that other EntLib users may benefit from them, consider sharing them via EntLibContrib as well.

C++ days in München with Boris Jabes & Visual Studio 11 Training Kit


The Visual Studio team at Microsoft has released the next version of Visual Studio as a developer preview .

It is available as a free download for everyone here .



In brief , Visual Studio 11 provides an integrated development experience that spans the entire lifecycle of software creation from architecture to code creation, testing and beyond. This release adds support for Windows 8 and HTML 5, enabling you to target platforms across devices, services and the cloud . To get an in-depth walkthrough of the new features and enhancements in Visual Studio 11 , check out this video at the BUILD event that happened last month .

Alternatively , you can read about all the VS 11 highlights right here on MSDN .

Apart from this , the Visual Studio 11 Developer Preview Training Kit is also out now . This kit includes hands-on labs to help you understand how to take advantage of the variety of enhancements in Visual Studio 11 and the .NET Framework 4.5, how to support and manage the entire application lifecycle and how to build Windows Metro style apps .

So get started with coding and developing on the new VS 11 environment , and hope you have fun using it !!

What’s New for Visual C++ in Visual Studio 11 Developer Preview



Standard Template Library

As part of the added support in Visual Studio 11 Developer Preview for the C++11 specification, the Standard Template Library (STL) support in Visual Studio is extended to provide the additional programming constructs that specification requires. Highlights include the following:

  • Support for new headers <atomic>, <chrono>, <condition_variable>, <filesystem>, <future>, <mutex>, <ratio>, and <thread>.

  • To optimize memory resource usage, all containers are now smaller given their current representations. For example, in x86 release mode with default settings, std::vector has shrunk from 16 bytes in Visual C++ 2010 to 12 bytes in Visual C++ in Visual Studio 11 Developer Preview, and std::map has shrunk from 16 bytes in Visual C++ 2010 to 8 bytes in Visual C++ in Visual Studio 11 Developer Preview.

Other C++11 Enhancements
  • SCARY iterators: As permitted but not required by the C++11 Standard, SCARY iterators have been implemented. For more information, see the PDF document SCARY Iterator Assignment and Initialization.

  • Stateless lambdas, which is code beginning with an empty lambda-introducer [] and capturing no local variables, are now implicitly convertible to function pointers as required by the C++11 Standard.

  • Scoped enumerations support. The C++ enum class enum-key is now supported.

Visual C++ Compiler and Linker

  • Auto-vectorizer. One of the biggest potential performance gains is doing things in parallel instead of sequentially. Visual Studio 11 Developer Preview provides not only parallelism on the task level, but also at the loop level, automatically. The C++ compiler will automatically vectorize loops if it is possible. Vectorization reorganizes a loop, for example, a summation loop, so that the CPU can execute multiple iterations at the same time. By using auto-vectorization, loops can be up to 8 times faster when executed on CPUs that support SIMD instructions. For example, most modern processors support SSE2 instructions, which allow the compiler to instruct the processor to do math operations on 4 numbers at a time.

    Because the compiler recognizes loops that can be vectorized when you compile your code, this occurs automatically. Note that this differs from parallelization, which is described in the next list item.

  • Auto-parallelizer. Visual Studio 11 Developer Preview is improving the way you can take advantage of multiprocessor and multi-core hardware. With the the auto-parallelizer, a loop is reorganized so that it can be executed on multiple threads at the same time. This means that your application can take advantage of multi-core CPUs and multiprocessors to distribute chunks of the work to all available processors. The parallelizer automatically reorganizes loops and executes multiple tasks, all without the need for you to add any new code to your application. You can tell the compiler which loops to parallelize with the #pragma parallelize directive.

    There are some key differences between auto-vectorization and auto-parallelization. First, auto-vectorization is always on and requires no user interaction, while auto-parallelization requires the programmer to decide which loops will be parallelized. Also, vectorization improves the performance of loops on single-core CPUs that support SIMD instructions, while parallelization improves the performance of the loop on multiple CPUs and multi-core CPUs. The two features can work together so that a vectorized loop is then parallelized across multiple processors.

  • C++ Accelerated Massive Parallelism (AMP) Support. C++ AMP accelerates the execution of your C++ code by taking advantage of the data parallel hardware that is ordinarily present as a GPU on a discrete graphics card. The C++ AMP programming model includes multidimensional arrays, indexing, memory transfer, tiling, and a mathematical function library. C++ AMP language extensions and compiler restrictions enable you to control how data is moved from the CPU to the GPU and back. For more information, see C++ Accelerated Massive Parallelism (C++ AMP).

Visual C++ Libraries

Parallel Programming Improvements

With hardware moving to multi-core and many-core architectures, developers can no longer rely on ever-increasing clock speeds of single cores to enhance application performance. The parallel programming support in the C++ concurrency namespace enables developers to take advantage of these new architectures.

In Visual Studio 2010, we saw the introduction of powerful C++ parallelization libraries such as the Parallel Patterns Library. We also introduced concepts to take advantage of concurrency by expressing sophisticated dataflow pipelines. In Visual Studio 11 Developer Preview, these libraries have been extended to provide better performance, more control, and richer support for the parallel patterns developers need most. The breadth of the offering now includes:

  • Parallel patterns library, which supports fork-join parallelism (parallel_for, parallel_for with affinity, parallel_for_each, parallel_sort, parallel_reduce, parallel_transform).

  • A rich task-based programming model that supports asynchrony and continuations.

  • Agents and Messaging, which lets developers express dataflow pipelines that naturally decompose into concurrent units.

  • Concurrency-safe containers package, which provides thread-safe versions of std:: data structures such as priority_queue, queue, vector and map.

  • Customizable scheduler and resource manager to facilitate the smooth composition of the previously-listed patterns.


In Visual C++ in Visual Studio 11 Developer Preview, the integrated development environment (IDE) has significant improvements in tools to help you be more productive coding in C++. For more information about other IDE enhancements, see Product Highlights for Visual Studio 11 Developer Preview.

  • Visual Studio Templates support. You can now author C++ project and item templates using the Visual Studio Templates technology. This was previously unsupported for C++.

  • C++/CLI IntelliSense. C++/CLI now has full IntelliSense support. All the IntelliSense features such as Quick Info, Parameter Help, List Members, and Auto Completion now work for C++/CLI. In addition, the new IntelliSense and IDE enhancements listed in this topic also work for C++/CLI.

  • C++ Code Snippets. Skeleton code is available for basic code constructs, such as switch, if-else, and for loop, among others, in the List Members drop-down. Select a code snippet from the list to insert it into your code and then fill in the required logic. You can also create your own custom code snippets for use in the editor. For more information, see Code Snippets.

  • List Members Enhancements. The List Members drop-down appears automatically as you type code into the code editor. Results are filtered, so that only relevant members are displayed as you type. You can control the type of filtering logic used by the Member List in the Options dialog box under Text Editor, C/C++, Advanced. For more information, see Using IntelliSense.

  • Semantic Colorization. Additional C++ tokens, such as types, enumerations, and macros, among others, now have colorization. By default, this colorization is enabled. Parameters appear in italic. You can specify additional token colorizations in the Options dialog box under Environment, Fonts and Colors. For more information, see Code and Text Editor.

  • Reference Highlighting. Placing your pointer on a symbol now highlights all instances of the symbol in the current file. Press CTRL + SHIFT + UP ARROW or CTRL + SHIFT + DOWN ARROW to move among the highlighted references. You can turn this feature off in the Options dialog box under Text Editor, C/C++, Advanced.

Code Quality Tools

Parallel Debugging

In addition to the Parallel Tasks window and Parallel Stacks window available in Visual Studio 2010, Visual Studio 11 Developer Preview offers a new Parallel Watch window that lets you observe the values of an expression across all threads and processes, perform sorting and filtering on the result, and extend the window with your own visualizers. You will also be able to take advantage of the new multi-process support across all tool windows.

C++ Accelerated Massive Parallelism (AMP) Debugging and Profiling

Debugging. For applications that use C++ AMP to target the GPU, the familiar CPU debugging experience of Visual Studio is offered. This includes the new parallel debugging additions previously mentioned. Debugging C++ AMP apps is just like debugging any C++ app.

Profiling. There is now profiling support for GPU activity supporting C++ AMP and other Direct3D-based programming models.

Static Code Analysis

Static analysis for C++ has been updated to provide richer error context information, more analysis rules and better analysis results in the new Code Analysis window. In this window, you can now filter messages by keyword, project, and severity. Selecting a message in the window highlights the line in the source code editor where the message was triggered. For certain C++ warnings, the message will list source lines to show you the execution path that led to the warning.

Other code analysis enhancements include the following:

  • New concurrency warnings to help you make sure that the correct locking disciplines in multithreaded C/C++ programs. The analyzer detects several concurrency bugs. These include potential race conditions, lock order inversions, caller/callee locking contract violations, and mismatched synchronization operations.

  • You can specify the C++ analysis rules that you want to apply to code analysis runs by creating or using rule sets.

  • In the Code Analysis window, you can insert a pragma into the source code that suppresses a selected warning.

For more information, see Analyzing Application Quality by Using Code Analysis Tools.

Updated Unit Test Framework

Use the new C++ unit test framework in Visual Studio to write C++ unit tests. Add a new unit test project to your existing C++ solution by locating the C++ Unit Test Project template under the Visual C++ category in the New Project dialog box. Start writing your unit tests in the generated TEST_METHOD code stub in the Unittest1.cpp file. Once the test code is written, you can discover tests automatically as follows: Build the solution, and then open a Unit Test Explorer Window by clicking View->Other Windows->Unit Test Explorer. Run the tests by right-clicking the test case in Unit Test Explorer, and select Run selected test. You can then view test results and additional stack trace information in the same window after the test run finishes.

Architecture Dependency Graphs

To understand your code better, you can now generate dependency graphs for binary, class, namespace, and include files in your C++ solution or projects. Open menu Architecture->Generate Dependency Graph->Project or Solution to generate a dependency graph for your whole solution or a selected project. Once the graph generation is complete, you can explore the diagram by expanding each node, learn dependency relationships by moving between nodes, and browse source code by right-clicking the node and selecting View Content. To generate a dependency graph for include files, right-click a *.cpp source code file or *.h header file and select Generate Graph of Include Files.

Layer Diagrams

Use layer diagrams to validate architecture design against implementation code written in C++. Create a new layer diagram by selecting menu Architecture->New Diagram->Layer Diagram. Start drawing the architecture by dragging and dropping shapes from the Toolbox window and then link projects, or by dragging and dropping existing projects from Solution Explorer onto the diagram directly. Once the architecture diagram is finished, right-click the diagram and select Validate Architecture to run validation against code. View results in theError List window (open from View menu). You can also generate dependencies with a right-click on the diagram and select Generate Dependencies. You can then visualize the actual code dependency on the layer diagram.

Architecture Explorer

The architecture explorer lets you explore the assets in your C++ solution, projects, or files. Find architecture explorer from the menu Architecture -> Windows -> Architecture Explorer. Click on nodes you are interested in; for example, Class View. Then the tool window will be expanded on the right side with a list of all namespaces. Continue by selecting one namespace and a new column will be created on the right side to show a list of the classes, structs, and enums in this namespace. Continue to explore the assets by selecting nodes, or go back to the column on the far left to restart the query.

Code Coverage

Code coverage has been updated to dynamically instrument binaries at runtime, which gives you lower configuration overhead and provides better performance. You can also collect code coverage data from unit tests for C++ applications within Visual Studio. Please see Unit Test Framework section of this topic to learn more about how to create and run unit tests. Once you have created C++ unit tests, you can use Unit Test Explorer to discover tests in your solution automatically. In Unit Test Explorer, select Analyze Code Coverage, which will run the unit tests and collect code coverage data for these tests. View the code coverage results in the Code Coverage Results window (Test->Windows->Code Coverage Results).