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.

How do I convert a Web Site to a Web Application

Problem: We created our application using the Web Site project template and would like to change to a Web Application. Solution: http://msdn.microsoft.com/en-us/library/aa983476(v=vs.100).aspx Explanation: Just don't use Web Sites! Why would I want my source code (all of my IP) on a server that could be compromised? They also do not play nice with source control systrems or automated build.

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.

Custom Action causes install to fail

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: I get “Could not find file *.InstallState” when using a custom action in Windows Setup Project. Solution: Override Install, Commit, Rollback, and Uninstall methods. Explanation: You will get this method if you don’t implement Install action. In my case I only implemented the Commit method.  Once I implemented the other methods my error went away.