I have to create the same branches in every new team project

Problem: I have to create the same branching structure in several team projects.  I would like a way to automate this process. Solution: Use the tf.exe and tfpt.exe command line tools in a batch file. Explanation: Using the tf.exe and tfpt.exe command line tools you can preform the same task from the command line that you can preform in the IDE.  Using tf.exe and tfpt.exe we can script the creation of the desired branching structure to speed up the process. You can download the Microsoft Visual Studio Team Foundation Server 2012 Update 1 Power Tools from here. The script below creates the Basic Branch Plan from the Visual Studio Team Foundation Server Branching and Merging Guide which you can download from here. The script must by run from a Developer Command Prompt so that tf.exe and tfpt.exe can be found.  Your other option is to update the environment variables for you machine to include the location of tf.exe and tfpt.exe in your path. @ECHO OFF REM If they did not provide arguments show them how to REM use this batch file if "%1" == "" GOTO Usage if "%2" == "" GOTO Usage REM Create a temp workspace to create the branches in. REM This will be deleted at the end tf workspace /new /noprompt temp /collection:%1 REM Before you can create branches you must do a get latest tf get $/%2 REM Create a main folder that will become the main branch of code md %2\Main REM Add this folder to TFS tf add %2\Main /noprompt REM Check in the main folder tf checkin /comment:"Adding main branch" /recursive /noprompt REM Now start creating the other branches REM main to dev tf branch $/%2/Main $/%2/Dev /noget /checkin REM main to release tf branch $/%2/Main $/%2/Release /noget /checkin REM We have to use tfpt from the power tools to convert REM the folder to a branch so we get the new branch icons REM in source control explorer tfpt branches /convertToBranch /collection:%1 /recursive $/%2/Main Echo Deleting temp workspace Echo. tf workspace /delete /noprompt temp REM Remove the directories we created rd %2 /s /q REM Skip usage and just end GOTO End REM Show how to use the script :Usage Echo This batch file will create the default Main, Dev and Release branches Echo for a team project. Echo Requires: Echo Microsoft Visual Studio Team Foundation Server 2012 Update 1 Power Tools Echo. Echo Usage: Echo createBraches collection teamProjectName Echo. Echo collection = http://tfs:8080/tfs/myCollection Echo teamProjectName = the team project name in that collection Echo. Echo createBranches http://tfs:8080/tfs/sandboxcollection teamProjectName :End createBranches.cmd (1.67 kb)

I can't connect to my load test repository.

Problem: When I try to Open and Manage Results from my load test I get an error: Solution: Make sure your controller is configured with the full name to the database server instead of . or .\sqlexpress.  Change to mySqlServer or mySqlServer\sqlExpress.

My web test data source is not loading all the columns from my csv file.

Problem: I have a data driven web test that calls other web test. The called web tests are also data bound to data loaded by the parent data source.  When I run my test I was getting the following error: Request failed: Context parameter 'FluidManagement.FluidManagement_json#csv.spacer2' not found in test context Solution: Expand the Data Sources node of your web test until you can select the desired table.  From the Properties window change the Select Columns from “Only select bound columns” to “Select all columns”. Explanation: The default behavior is to only select the columns that are bound the web test that defines the data source.  This is a reasonable assumption as long as the test does not call any other data bound web test.  If the test you call rely on columns that are not bound in the caller you must change the Select Columns setting.

How do I reset my Visual Studio Settings

Problem: I selected the wrong language when I started Visual Studio for the first time. Solution: From the Tools menu select Import and Export Settings.... From the Import and Export Settings Wizard select Reset all settings.  Complete the wizard to reset your settings.

I only see the last 10 steps of my Exploratory Testing in MTM when I create a test case.

Problem: I used the "Do Exploratory Testing" freature of Microsoft Test Manager (MTM) but only the last 10 steps show up when I create a test case. Solution: In the new test case window press the "Change steps" button above the test steps.  This will bring up a dialog box allowing you to select additional steps.   Explanation: The default number of steps to include in a test case is 10. That value is in the mtm.exe.config file: <!-- The number of actions selected by default when a bug or test case is created         while exploring the app or providing feedback. The number of actions displayed by default are         four times this number -->    <add key="DefaultNumberOfActions" value="10"/>  

I can't create a new backup plan in TFS 2012 after a hardware migration.

Problem I upgraded my TFS from 2010 to 2012 and moved to new hardware after my 2010 machine crashed. When I attempt to setup a new backup plan using the 2012 Power Tools I get the following error: A backup plan already exists for this TFS system on a different machine Solution Connect to SSMS and create a new query using Tfs_Configuration and execute the following command. EXEC sp_dropextendedproperty @name = 'TFS_BACKUP_PLAN_CONTROLLER' Explanation The database has an extended property that it stores the name of the machine used for the backups. This was set while running on the original hardware. You have to remove this value before the power tool will allow you to configure a new backup.

I can't view my localized values of my MVC application

Problem: I have changed the language of my browser but I am still only getting me default resources. Solution: Add the following line to your web.config as a child of the system.web element. <globalization enableClientBasedCulture="true" uiCulture="auto" culture="auto"/> Explanation: While working on an ASP.NET MVC application I wanted to test my localized resource files.  From the options of my browser I updated the language.  However, when I viewed the page I continued to see the default values.  Not until I added the globalization element to me web.config did my browser load the correct resources.

All my workspaces are missing!

Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Problem: After a TFS server move all my workspaces are missing. Solution: Use the TF.exe Workspace command with the /newowner option. Explanation: During a recent TFS upgrade and migration from TFS 2010 running in workgroup mode to TFS 2012 on a new server I lost all my workspaces.  From the new TFS server I could run the TF.exe workspaces command and see all the existing workspaces.  However, if I were to open Visual Studio on any of the client machines none of those workspaces would show up. When TFS is in workgroup mode user accounts are all local accounts.  On the TFS server there was for example a Donovan L Brown account.  The name would be in the format of ComputerName\UserName.  After I moved to new hardware the computer name was different.  However, all the workspaces were owned by the accounts with the old computer name.  You can confirm that by running the TF.exe workspaces command and looking at the owner column. My goal is to simply update the owner of the workspace to point at the new local Donovan L Brown account on the new computer.  tf workspace [/collection:TeamProjectCollectionUrl] [workspacename[;workspaceowner]] [/newowner:ownername] If you have pending changes in the workspaces you will have to shelve them first.  This can be a bit of a challenge as well because you are not the owner of the workspace yet.  To work around this just use the TF.exe workspace command to change the workspace to public.  After which you can shelve the changes using your new account.  Once the changes are shelved you can change the workspace owner to the new account. Finally you can unshelve your changes and return to work.

More fun with CUIT

Problem: I have a CUIT that does not run as fast as I would like. Solution: Use the Coded UI Test Editor in Feature Pack 2 to adjust the actions recorded. Explanation: