Sitecore Swamp

Dive in the Sitecore Swamp


Visual Studio Extension - VSColorOutput

If you like me, always turn on the detailed build output verbosity, you must know the output information is bit too much. Now with VSColorOutput, it becomes quite easy to focus on the more important things.

What is it?

VSColorOutput can change the color of a line emitted to the output window based on specified rules. The rules consist of regular expressions. Rules map to classifications which in turn map to colors. (More information)

The default patterns will color build errors in red, warnings in yellow/gold and successfull build messages in green.


Object Exporter - Visual Studio Extension

Has it happened to you that you want see and save a variable value when you doing debug in visual studio. For example, for a particular exception, you want save and share the detailed information, or you have a list of objects too difficult to watch. You can type the variable in immediate command window, and copy/paste the output, or you can use Object Exporter.

Start your debug mode, and make a break point. Now highlight the variable, and tools > Export Objects:

You can choose output format as C# Object Initialization Code, JSON and XML. Pretty cool!

Remove TFS workspaces

In command line prompt:

<workspacefoler>\"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workspaces /remove:*

note: Visual Studio 12 is Visual Studio 2013

Display More Details in Visual Studio Build Output

If you demand more information from Visual Studio output when building the VS solution, here the way:

VS > Tools > Options > Projects and Solutions > Build and Run

By default, the minimal is selected, and it only displays the most important messages. Normally, I change it to Detailed, you will see the difference as much more information will be in the output. Together with VSColorOutput, you will have the best experience on the VS build output.

Undo unchanged (TFS)

Visual Studio automatically checkout the file for edit, which is good for convenience. But the file keep the check-out status, even you roll back all the changes. When you try to commit changes, the file will be in the pending list, however it's identical to the server one.

If you have Team Foundation Power Tool installed, you can do the following command to undo the unchanged files:

tfpt uu . /noget /recursive

Even better, create an external tool in Visual Studio to do it in a click:
VS > Tools > External Tools:
Title: Undo unchanged
Command: tfpt.exe
Arguments: uu . /noget /recursive
Initial directory: $(SolutionDir)