I can't build my Wix projects with Team Build

Problem: I get the following error when I attempt to build a solution using TFS that contains a Windows Installer XML (WIX) project: "light.exe: Error executing ICE action 'ICE01'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wix.sourceforge.net/faq.html#Error217 for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance."." Solution: The build service account must be in the Administrators group on the build machine.

SharePoint strikes again and takes down Release Management

Problem: My Release Management Application Pool (ReleaseManagementAppPool) is stopped and will not stay running. Solution: Open the ApplicationHost.config from “%systemroot%\system32\inetsrv\config” and add “preCondition="integratedMode,bitness64"” to the SPNativeRequestModule entry: <add name="SPNativeRequestModule" image="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\isapi\spnativerequestmodule.dll" preCondition="integratedMode,bitness64" /> Explanation: This is most likely to appear if you have SharePoint 2013 installed on the same server hosting Release Management.  This issue with SharePoint may cause any 32 bit website from working.

Trackyon CUIT Helpers

Trackyon LLC CUIT Helpers The Coded UI Test (CUIT) Helpers from Trackyon LLC allows IIS Express or Visual Studio Development Server (Cassini Web server) to be started by your test.  This prevents Coded UI Test from beginning without a server running. Features: Start and Stop IIS Express Start and Stop Visual Studio Development Server (Cassini Web server) Usage: To start using the package verify the app.config file of your test project contains either the webDevPath and/or the iisExpressPath values added to your appSettings section. These values are used by the library to start the respective web server.  If you installed the package using nuget the keys were added for you with paths assuming you are running .NET 4.0 and on a 64 bit machine.  If you are not running .NET 40 or not on a 64 bit machine you will need to adjust the paths. <add key="webDevPath" value="C:\Program Files (x86)\Common Files\microsoft shared\DevServer\11.0\WebDev.WebServer40" /> <add key="iisExpressPath" value="C:\Program Files (x86)\IIS Express\iisexpress" /> Starting Visual Studio Development Server (Cassini Web server) You can use the static Start method of the WebDev class in the Trackyon.CUIT.Helpers namespace.  The Start method takes two parameters port and path. Port is the port you want the web server to use to host your application.  Path is the path to the project to load.  The WebDev class provides a helper method FindProjectFolder that given the TestContext and Project Name will determine the path for you at runtime so the path is not hard coded.  Hard coding the path would require all developers to map the project to the same location on their machines.  The example below would start the MyWebApp project of the currently loaded solution on port 8081. WebDev.Start(8081, WebDev.FindProjectFolder(TestContext, "MyWebApp")); Once the test run is complete simply call Close to stop the server.  Starting IIS Express The IISExpress class also provides a static Start method, however, this method only takes a single parameter sitename.  The site name must map to a site already configured in your applicationhost.config file.  The site would be configured in the applicationhost.config file if you have setup your project to use IIS Express from the Web section of the project properties.  This file can be located in one of the two following locations: %userprofile%\documents\iisexpress\config\applicationhost.config %userprofile%\my documents\iisexpress\config\applicationhost.config The example below would start the MyWebApp site in IIS Express. IISExpress.Start("MyWebApp"); Once the test run is complete simply call Close to stop the server. Known Issues The icons for the servers may stay in Notification Area after the server has been closed.  Simply hovering your mouse over the icons will make them disappear. The servers will close after the test is complete regardless if you call close or not. They are created as child processes of the test assembly and when the test are unloaded the process is terminated.

KB2870699 breaks Coded UI Test

Problem: All my Coded UI Test start failing because they can't find the controls.  Solution: Uninstall KB2870699 - MS13-069: Cumulative security update for Internet Explorer: September 10, 2013. Explanation: After my machine applied several windows updates all my Coded UI Test that were working before the updates all began to fail. The test were unable to perform actions because the controls were hidden.  Each test would fail with the following exception: Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnHiddenControlException You can read more about the issue here: Further Information After I uninstalled the update and rebooted my machine all my test began to run again.

How to set the “default” configuration for a project.

Being a Process Consultant specializing in TFS I teach many companies how to use Team Build.  When you create a new build definition you have the option to set “Configurations to Build”. However, if you leave that value blank the build will build the “default” configuration. The questions I am inevitability ask are “what is the default configuration” and “how do we set the default configuration”?  Well in this post I will show you where it is stored and how to update it for typical Visual Studio 2012 project. Visual Studio projects are msbuild scripts and because of that we can set properties in the actual project files that are going to be sent to msbuild to be compiled.  To change the default configuration you we need to load the project file as xml which is the file format of msbuild.  With the project open in Visual Studio simply right click on the desired project and select “Unload Project” from the context menu.  Once the project is unloaded right click on it again and select “Edit [Project Name]” and Visual Studio will open the file as an xml file we can edit.  Search the file for a “Configuration” element in a property group (it is normally the first group).  It should look similar to this: <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>   This is the line responsible for setting the default configuration of your build.  Simply change “Debug” to the desired default configuration, save the file then right click on project file in Solution Explorer and select “Reload Project”.  After you check in your changes an queue a new build it will be built using this configuration if the “Configurations to Build” is blank in the build definition.

I can't find the Kanban board in Update 2.

  Problem:  I installed Update 2 for TFS but when I click board I don’t see the Kanban board I see the task board.  Solution: Click the board link at the top of the Backlog Page under the "Product Backlog" heading next to "stories". Explanation: The board link at the top left of the page between the backlog and work items links takes you to the task board. But if you click the board link below the "Product Backlog" heading where you enter new User Stories it will take you to the Kanban board.

I can't access app.config from my web test plug in

Problem:  I want to read the connection strings from my app.config of my Web Test Project but it never loads.  Solution:  Use the Configuration Manager OpenMappedExeConfiguration call to load the app.config file.  Code:  // Map the new configuration file.ExeConfigurationFileMap configFileMap = new ExeConfigurationFileMap();configFileMap.ExeConfigFilename =   System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name + ".config"; // Get the mapped configuration filevar config = ConfigurationManager.OpenMappedExeConfiguration(   configFileMap, ConfigurationUserLevel.None); Explanation: The app.config of the test project is not loaded for web or load tests, because they are run in the same application domain as the test process (either vstesthost.exe or qtagent.exe), so they will load their config files instead. Therefore, we simply load the configuration file ourselves. Loading a configuration file is a two phased process.  First we build a ExcConfigurationFileMap object and set the name of our configuration file to be loaded. Then we open that file with a call to OpenMappedExeConfiguration method of the ConfigurationManager class. I am not a fan of hard coded values so we are going to get the name of the assembly using reflection and simply concatenate ".config" to the end of it.  Calling System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name will return the name of the assembly. After calling OpenMappedExeConfiguration you can use the returned object to access the connection strings or any other data from the app.config.