Using Microsoft's UITypeEditors With The OOTB List<T> Editor

19 ביולי 2011

This post is a sequel to a previous post - The TFS Build Definition List<T> OOTB UITypeEditor. In my previous post I showed how easy and cheep it is to use the TFS’s build definition OOTB “List<T>” editor. We even saw that if we use enum’s or Boolean's the “List<T>” editor’s properties grid gives us drop-down editors for them, but what if we want to use more advanced editors; such as the “ServerFileBrowserEditor” to select a project from the source control or the “PlatformConfigurationListEditor” editor to choose in which configurations and platforms I want to...

The TFS Build Definition List<T> OOTB UITypeEditor

14 ביולי 2011

A while back I came a problem: I needed to build for a client an activity  that runs on an unknown number of projects and builds them with DevEnv 2005/2008/2010. I needed to create an editor that allows the user to select projects to be built in DevEnv and additional properties for each project such as “DevEnv version” and “Configuration to build”. The problem was that I had very little time to do this. This is where my good friend Baruch Frei came into the picture; He informed me that when I build a simple...

A List of Out of The Box Usable Microsoft “UITypeEditor”s

23 במרץ 2011

As I’ve shown in here, it is easy and productive to use the Microsoft built in “UITypeEditor”s in TFS 2010 build definitions. It is also possible to use them in other WinForms based environments. This is the list as I’ve extracted it from “Reflector”: Type Edited Editors string Microsoft.TeamFoundation.Build.Controls.BuildAgentSelectionEditor string ...

How to: Use The Internal Microsoft Custom UI Type Editors In TFS 2010 Build Definition

22 במרץ 2011

Let say that I want to enable clients to choose specific projects to publish from within a build definition. I can obviously add a StringList argument to the build, and have users write the server paths of each project they want to publish as a open strings. This off course leaves much room for errors on the client side, but farther more it just looks unprofessional! I don’t want to write A custom UIEditor for this purpose for the following reasons: I’m lazy, no time, and most important I know that such a control exits!! I...

How to Easily Debug a Custom Work Item Control

10 במרץ 2011

My friend Assaf Stone have seen my method of debugging Custom Work Item Controls and demanded that I blog about it at once. Thank you! :) First of all what do we need to debug the WIT custom control: We need the files that we want to debug to be in this folder: “C:\ProgramData\Microsoft\Team Foundation\Work Item Tracking\Custom Controls\10.0” or an equivalent folder. We need a second instance of visual studio, and use the “Attach to process” function from the old instance (the one in which I’m writing the control) to...
אין תגובות

Experimental Instance of VS 2010 – Safe And Easy Debugging

9 במרץ 2011

When you develop a Visual Studio package or add-in you want to be able to run and debug it without having to pollute your environment with untested and\or unfinished applications and components. This is where the Experimental Instance of Visual Studio 2010 shines. When using this method to debug, what will happen is the following: A new instance of visual studio will be opened when in the window title bar will written “Start Page – Microsoft Visual Studio (Administrator) - Experimental Instance”. If the developed app is actually...
תגובה אחת

How to Indicate Unsaved Changes in TFS 2010 Build Definition Custom UI Type Editor

1 במרץ 2011

(* – Asterix mark on the parent window) When I built my own custom UI type editor it was fairly easy, and fully functional. There was only one bug: when changing (editing) the object in the custom editor, the build definition window did not indicate to me that I had unsaved changes. Beyond this being extremely annoying, it is also a huge problem because if I close the window I will not know that my changes where not saved (in the case I did not save them). For this example I will use...

Problem Deserializing Classes From Assemblies Loaded at Runtime Implicitly – TFS Build Custom UI Type Editor

Lately I’ve created a Custom UI Type Editor for the “Process” Tab in the TFS Build Definition Interface, and came across a problem. Since my object was a bit complex combined with the reason shown here, I decided to use serialization to “Deep Copy” the object. For an example I will use the Credential editor, made originally by “Ewald Hofman”. This is the modified code: Credential objet: 1: 2: public class Credential ...

Stopping Work Item Save From a Custom Work Item Control (in VSTS only, not in MTM)

22 בפברואר 2011

Sometimes we want to stop a work item from being saved, for security reasons (permissions) or in order to enforce a condition of some sort, This is possible with a work item custom control. In order to stop a work Item from being saved all you have to do is throw an exception. Throwing an exception will stop the work item  from being saved and will display the exception in a proper message box. IMPORTANT: This will not work in MTM!! even though it will stop the WI from being saved it will also cause...
אין תגובות

How to fix Tfs_Analysis when it is corrupt.

20 בפברואר 2011

Problem: I was approached by my friend Nimrod Stern to help him with a problem he had regarding TFS reports. When trying to open a TFS report the following error was received: An error has occurred during report processing. (rsProcessingAborted) Query execution failed for dataset 'dsIteration'. (rsErrorExecutingCommand) Errors in the metadata manager. An error occurred when loading the Team System cube, from the file, '\\?\C:\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Data\Tfs_Analysis.0.db\Team...