Thursday, September 27, 2007

runas cmd makes your life easier

This week I had to temporaly use a different user on my machine. So at first I thought I had to move all my settings (outlook profile, firefox bookmarks, vms, etc) from my primary user to this new one. This is not a nice task. Hopefully I remembered the runas command which allowed me to run the above programs (indeed I'm currently creating this post running WLW using runas) as my primary user from the new user session. IMO this is definitily a very good tip if you have the same scenario in the feature.

Wednesday, September 26, 2007

Read source code to be a better developer

I want to give it a try. My idea is to take a look at one or two projects every week and post some conclusions of what I could learn of them. Here you have for example the latest Scott Hanselman's post showing his weekly results.  So if you have in mind a really cool source code stuff, please feel free to ping me (leaving a comment to this post or using the contact me link) and let me know where I can get it!  Thanks!

Tuesday, September 11, 2007

Adding a custom VS Task List Token

You probably used the TODO task list token to add a comment about what it should be done. But what about if you want to use a custom token to add a different kind of comment; for example a Review(x) comment. VS allows you to add custom task list token via Tools->Options->Environment->Task List as it's shown in the following screenshot:

So then you will able to add the Review comments and these will be appearing in the Task List comments section:

Friday, September 07, 2007

My blog is also on weblogs!

A few days ago I got an account to start blogging at So I decided to move the latest posts using a cool tool jes did and for now my idea is to post the same content in both blogger and blogs. I'm also considering the alternative of using the Cross-Post plugin kzu did. So you can check the new blog on and leave a comment if want to as well! 

adalon on weblogs:

TCI - Toolbox Controls Installer

TCI is a VS Package that is provided by the VS SDK as a redist. TCI allows you to easily add your custom Control to the VS Toolbox. For a brief introduction to TCI you can check the VS SDK documentation. Here I will try to cover what is happening under cover:

When you want to add your custom control to the VS toolbox using the TCI VS Package all you need is to tell TCI where the assembly containing the control is and notify to TCI this event incrementing a registry key. Probably the easier way to achieve these requirements is using a WIX-based installer (as the SDK sample does).

In order to tell TCI where your control is you can use the the fully qualified type name if you are installing the control in the GAC as following:

<Registry Root="HKLM" Key="Software\Microsoft\VisualStudio\9.0\ToolboxControlsInstaller\GacControl, Version=, Culture=neutral, PublicKeyToken=1631b3e7a8fbcce5, processorArchitecture=MSIL" Value="Litware Controls" Type="string" />

Or provide a location where the assembly containing the control is using the CodeBase value:

<Registry Root="HKLM" Key="Software\Microsoft\VisualStudio\9.0\ToolboxControlsInstaller\NonGacControl, Version=, Culture=neutral, PublicKeyToken=1631b3e7a8fbcce5, processorArchitecture=MSIL" Value="Litware Controls" Type="string">
<Registry Name="Codebase" Value="[#AssemblyContainingTheFile.dll]" Type="string" />

Finally you have to include the MSM containing the custom actions which notify TCI that a new Control has been installed:

<Merge Id="TbxCtrlsInstDefaultItemsCA" Language="1033" SourceFile="..\..\..\Redistributables\TbxCtrlsInstDefaultItemsCA.msm" DiskId="1" />

The custom action will increment or decrement the "Default Items" value of the following registry entry:

"Default Items"=dword:00000001

Note that the {2c298b35-07da-45f1-96a3-be55d91c8d7a} is the GUID for the TCI VS Package.

It's important to check if the TCI Redist is already installed before installing your custom controls if you targeting VS 2500. It's not necessary for VS codename "Orcas" because TCI Package is already installed. You can find the TCI VS Package in the VS's Private Assemblies directory. 

This page is powered by Blogger. Isn't yours?