Monday, October 27, 2014

TFS 2013 Build Agents and MSTest.exe

Minimum set of MStest.exe requirements for TFS 2013

We came to a situation where we needed to upgrade our TFS build agents and controllers from TFS 2012.4 to 2013.3 in order to gain from bug fixes and features enhancements.

Quick tour of our lab: We have many build and test agents under one controller. User initiate gated check-in and then TFS start MSBuid process then MSTest for testing on set of dedicated agents. The agents are volatile: we remove faulty agents and quickly create new one (or some) using SC-VMM. Agents are template and the creation done with a few clicks.

The documented way to keep supporting MSTests with TFS 2013.3 is by installing Visual Studio + Update 3 on top of TFS. It comes with a toll – a lengthy installation time (about one hour for both RTM + Update) and few gigabytes of disk space. This procedure turn our agents from light, agile and quickly created, to heavy cumbersome and takes very long to create.
We started looking for alternative, meaning installing the minimum required for MSTest to run all our functions.

The task was not trivial since in 2012.4 MSTest.exe was part of the package and using it was seamless. In TFS 2013.3 MSTest is not installed (it was replaced with . In fact Microsoft pointed to install Visual Studio Agents on top of TFS 2013.3 Server. That alone was not enough as MSTest fail to initiate: "Could not load file or assembly 'Microsoft.VisualStudio.TeamSystem.Common.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."

This assembly obviously is part of the Visual Studio. Again, we didn't want the full-fledged VS to be installed so we tried using the lightweight slim version of VS called "Team Explorer for Microsoft Visual Studio 2013". I managed to trim down the unnecessary packages and truncate its size to merely 250MB and about 5 min of setup.
This worked! All but one MSTest function of publishing. On MSTest publishing (the results to TFS DB) we got ".Entry point was not found. Publish failed or canceled.". It appears that this installs the RTM version of VS components and we need to have the Update 3 to fit to all other VS binaries. Once again we needed to install update 3 which requires Internet connection and took a very long time to install.
Now, this is the cherry pie: I took the Update 3 ISO which is 4GB and extract it. After searching inside the packages folder I found that there is one major .msp patch - kb2829760.msp a 120MB package.
This KB is not well documented and if you search for it you will hit SV 2013 UP3 article.
Anyway, by solely installing it, all VS components get UP3 upgrade and all of our MSTest functions works properly.

All in all we manage to trim down the 4GB VS 2013 and around an hour to to 100MB of VS Agents + 250MB or Team Explorer + 120MB of kb2829760.msp which takes about 10min altogether..

Monday, August 9, 2010

Fixing Outlook 2010 GMail tasks duplications in the To-Do List

If you're using GMail account working with Outlook 2010 you'll notice that every time you flag a message or create a task it will appear number of times in your tasks list. The reason is that in IMAP GMail the messages are stored in few different locations like All Items, Inbox, and labeled location. Outlook cannot tell which is identical task thus make all the occurrences flagged.
To overcome this you need to create a filter to have the right view.

  1. In the To-Do list pane, right click anywhere and choose Filter.
  2. Choose Advance tab and add new rule.
  3. Choose the "In Folder" field and create rule for every folder you want to be appear in the To-Do list:

You can simply add single rule with "All Items" as the value.
Now the *real* treat:
To have the same view in Outlook Tasks desktop gadget, you need to put the same filter on the gadget script. This could be related to my previous post (Tasks gadget for Outlook 2010):
  1. In the same Filter of the To-Do list, click the SQL tab and check "Edit this criteria..." checkbox.
    Copy the entire SQL code.
    Uncheck the Edit box and close the filter box.
  2. In explorer or CMD go to "C:\Users\\AppData\Local\Microsoft\Windows Sidebar\Gadgets\OutlookTasksGadget.gadget"
  3. Edit with notepad ..\en-US\js\tasks.js
  4. go to line 881where is "var filter = "@SQL=(\"http:...."
  5. duplicate the line and remark the first one with //
  6. Now paste the SQL code after the SQL statement and add the appropriate slashes for JS syntax. the SQL code f the filters shown in step 3 looks like this:

    var filter = "@SQL=((\"http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81010003\" = 0 OR \"http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81010003\" = 1 OR \"http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81010003\" = 3) AND (\"http://schemas.microsoft.com/mapi/proptag/0x0e05001f\" LIKE '%Starred%' OR \"http://schemas.microsoft.com/mapi/proptag/0x0e05001f\" LIKE '%Tasks%' OR \"http://schemas.microsoft.com/mapi/proptag/0x0e05001f\" LIKE '%Inbox%'))"

    pay attention to the backslash BEFORE the http line and AFTER.
Save and close tasks.js, close and reopen the gadget. the filter is now part of the Outlook Tasks  gadget.


Tasks gadget for Outlook 2010

Applied to: Windows Vista, Windows 7

If you're using Outlook 2010 and you want to have desktop gadget for Outlook Appoitment and Outlook Tasks from the gadget gallery, you'll find that they are only compatible with Outlook 2007. To fix that you need to make few changes to the gadget scripts.
This method below is proved to be 100% compatible with Outlook 2010.

  1. Download and Install Outlook Upcoming Appointments or Outlook Tasks gadget.
    After installing you'll get "This gadget requires Microsoft Outlook 2007."' so here's how to fix:
  2. In explorer or cmd go to "C:\Users\\AppData\Local\Microsoft\Windows Sidebar\Gadgets" then go to either OutlookAppointmentsGadget.gadget or OutlookTasksGadget.gadget.
  3. Edit with Notepad or your favorite text editor (mine is Notepad2) en-US\js\outlook.vbs.
    Change in line 22:
if value = "Outlook.Application.12" then
to
if value = "Outlook.Application.14" then
again in line 45 change
if mid(versionString, 1, 2) <> "12" then
to
if mid(versionString, 1, 2) <> "14" then

That's it. Now you can simply close the gadget and open it again.

התחלה

בלוג זה נוצר כדי לשפוך את התובנות, ההארות וההבנות שלי בתחום המחשבים, טכנולוגיה והמדיה הדיגיטאלית.
הפוסטים יכללו טיפים, טריקים ושיפורים לחווית המשתמש בווינדוס ואינטרנט.
אין לי כל כוונה להביא לרייטינג גבוה. מי שקורא - שיהנה, ולא, יהיה לי כמחברת לרישום רעיונות ופעולות.
מידי פעם יכללו הפוסטים קוד סקריפטים, דיבורים על טכנולוגיות מתקדמות ויכתבו בלשון מעורבת - אנגלית ועברית.

Google Hebrew to English translation of the above (funny):
This blog was created to shed the insights, insights & understandings in my computer, technology and digital media.

Posts will include tips, tricks and User Experience and Internet improvements.

I have no intention to bring the ratings high. Anyone who reads - will benefit, and no, I will register as the author of ideas and actions.

Will include posts from time to time code scripts, talk about advanced technology involved and write the language - English and Hebrew.