Saturday, March 21, 2015

Global Assembly Cache (GAC) Assembly Management with Windows File Explorer

Managing the Windows 7 Global Assembly Cache (GAC)

The problem was this, I had a complex application with an installer. Post-install on a Windows 7 machine, I needed to debug the application by overwriting an assembly (DLL) that was installed with an assembly built for for debug and its corresponding PDB file. As part of the install process, the assembly was in the Global Assembly Cache (GAC).GACUtil (Gacutil.exe (Global Assembly Cache Tool)) is a command-line utility that can add assemblies to the GAC, remove assemblies from the GAC and provide a list of assemblies in the GAC.

Ultimately GACUtil is a command-line utility where Windows File Explorer is a more natural way manage the contents of the GAC. The Global Assembly Cache is just a folder, located under: C:\Windows\assembly and appears as follows on a Windows 7 machine:


What is displayed on Windows 7 when C:\Windows\Assembly is viewed in File Explorer is Assembly Viewer. The Assembler Viewer means File Explorer (under Windows 7) cannot be used to manage the GAC, hence GACUtil become a necessity. There is no convenient drag/drop or copy/paste as is the case when simply managing files with Windows Explorer.

A quick internet search revealed a technique to disable Assembly Viewer, "How to copy or replace DLLs from your GAC." The previous link is a blog posting written by Mohammed Adenwala a senior technical evangelist with Microsoft so obviously a very knowledgeable person in the Windows arena. His blog posting is all text and no screenshots. The first comment following his write up is:



The technique demonstrated Adenwala is to navigate to HKLM\Software\Microsoft\Fusion in RegEdit and to add a 32-bit DWORD key DisableCacheViewer where the value is set to 1. Rather than assume ever develop understand the previous sentences lets demonstrate with screenshots. In order to display the registry bring up Regedit which can be found under Windows 7 as follows:



When regedit is run it displays the following:


The root level kevys of the registry each have a rather long name so developers over the years have have developed a shorthand:

  • HKEY_CLASSES_ROOT is abbreviated HKCR
  • HKEY_CURRENT_USER is abbreviated HKCU
  • HKEY_LOCAL_MACHINE is abbreviated HKLM

So the instructions to disable assembly viewer should be clear now since root key abbreviations have been itemized: within Regedit navigate to HKLM\SOFTWARE\Microsoft\Fusion and create a DWORD value named, DisableCacheViewer, with a value of 1. Using RegEdit is is possible to navigate to the location, HKLM\SOFTWARE\Microsoft\Fusion, which is shown below:



To create a new key simple click the area of RegEdit where keys are normally display and select New | DWORD (32-bit) Value:


When a new value is created it will be appear in RegEdit as follows, New Value #1:


Right clicking on the name, New Value #1, it is possible to rename it to DisableCacheViewer which is demonstrated below:


Double clicking on the name DisableCacheViewer  allows this value to be edited where a value of 1 can be specified:


Once the value of DisableCacheViewer  has be set to 1 it will appear as follows in RegEdit:


File Explorer now shows the files within the GAC (C:\Windows\Assembly) sans Assembly Viewer (no reboot required):


Below it is shown that it is simply possible to navigate to any assembly with the GAC such as AuditPolicyGPManagedStubsInterop.dll, 32-bit instance, version, \6.1.0.0, singing key 31bf3856ad364e35:



A bunch of screenshots demonstrating how to display GAC files within File Explorer should not be construed as criticism of Mr. Adenwala's blog posting. His posting provided enough information for most developers to access the DLL's in the GAC via File Explorer. My comment to Mr. Adenwala's blog posting is as follows:

Managing the Windows 8 Global Assembly Cache (GAC)

Throughout this posting, the term Windows 7 was used to specify how Assembly Viewer was dispalyed when viewing C:\Windows\Assembly was viewed in File Explorer. Under Windows 8 the following is displayed in Windows Explorer when C:\Windows\Assembly is accessed:


An experiment is in order to see if Assembly Viewer works within File Explorer on Windows 8. The registry key,. DisableCacheViewer, was added (type DWOD) under HKLM\Software\Microsoft\Fusion and the value set to 0 (which means Assembly Viewer is enabled).


Even after DisableCacheViewer is set to zero Assembly Viewer is not displayed.

Windows 8 the operating system that brought: :
  • Support for 64-bit Hyper-V virtual guest machines
  • Disabled Assembly Viewer when access the C:\Windows\Assembly
How is C:\Windows\Assembly displayed in Windows 10? Well... That is an exercise left to the reader.

Tuesday, January 27, 2015

Visual Studio Community: A Free Development Tool from Microsoft

Introduction

For nearly a decade Microsoft has provided free versions of its development tool, Visual Studio. This article presents an overview of these no-cost tools and provides instructions on where to acquire the latest versions of these tools.  The installation and setup of  Microsoft's latest free development tool, Visual Studio Comunity 2013, will be reviewed.

Visual Studio supports developing applications in C#, C++ and VB.NET, The platforms supported include web, desktop, store/app, phone, database and cloud-based development. The first iterationsof Microsoft free development tools were called Visual Studio Express editions (2005, 2008, 2010 and 2012). The current edition of Microsoft's free development tools are called Visual Studio Community 2013. Visual Studio Community 2013 added support for extensions/plugins.

Visual Studio Express

In 2005 Microsoft released several versions of Visual Studio Express 2005. This product was provided at no cost to developers in response to the plethora of free development tools from the open source community. The versions of Visual Studio Express released are  target specific languages and included Visual Studio Express 2005, Visual Studio Express 2008 and Visual Studio Express 2010. The flavors of Visual Studio Express released are:
  • Visual Basic Express
  • Visual C++ Express
  • Visual C# Express
  • Visual J# Express (only Visual Studio Express 2005): support for this language ends in 2015.
  • Visual Web Developer Express
  • Visual Studio Express for Windows Phone (only Visual Studio Express 2010)

As of 2012, Microsoft moved from per-language versions of Visual Studio Express to per-platform versions of Visual Studio Express. The versions of Visual Studio Express released after 2012 include:
  • Visual Studio Express 2012 for Web
  • Visual Studio Express 2012 for Windows 8
  • Visual Studio Express 2012 for Windows Desktop
  • Visual Studio Team Foundation Server Express 2012
  • Visual Studio Express 2013 for Web
  • Visual Studio Express 2013 for Windows: original download supported Windows 8.1 only. Update 2013.2 added support for Windows Phone 8.1.
  • Visual Studio Express 2013 for Windows Desktop
  • Visual Studio Team Foundation Server Express 2013

Visual Studio Community

On November 12, 2014 Microsoft released Visual Studio Community 2013 edition (Visual Studio Community 2013): 



Prerequisites

In order to install Visual Studio Community edition the requisite operating system must be Windows 8.1, Windows 8 or Windows 7 SP1.

The hardware requirements are as follows:
  • 1.6 GHz or faster processor
  • 1 GB of RAM
  • 20 GB of free hard disk space
  • 5400 RPM hard-drive
  • DirectX 9-Capable Video card with 1024x768 of minimum resolution

Installation

This development tool can be downloaded from Visual Studio Community 2013 download:


Clicking on the Download button displays the following:


When the application runs it will give a warning if a version of Internet Explorer is installed that is earlier than Internet Explorer 10. When the installer for Visual Studio Community is run the following screen is displayed:



A user must agree to the licensing terms to install. The vast majority of developers do not modify the installation folder. Clicking on Next displays the following:





The previous screen is displayed during the installation of Visual Studio Community.

Once the application has been installed the screen displayed is as follows:



The previous screen is displayed once Visual Studio Community is installed. Clicking on LAUNCH, launches Visual Studio Community.

Creating a Microsoft Account

Before launching Visual Studio Community for the first team, every developer should have a Microsoft account. A Microsoft account is simply an email address from Microsoft (outlook.com, hotmail.com, live.com, etc.). Additionally it is possible to take a work/Gmail/Yahoo email address and convert it into a Microsoft account (meaning Microsoft will associated a password with the provided email). To take a non-Microsoft email can create a Microsoft account with it, visit https://login.live.com:


At the lower right there is a link that can be clicked in to sign up for an account Sign up now

Launching Visual Studio for the First Time

When Visual Studio Community is Launched for the first time, the following screen is displayed:



Visual Studio will save a developers settings "to the cloud". This means that when a user logs in the setting are the same for each version of Visual Studio. For example, a user can select within Visual Studio settings to use spaces instead of tabs and selects 2 spaces for each tab key pressed, When a user is logged into Visual Studio, these settings are the save regardless of the machine on which a user is on when they bring up Visual Studio. 

In licensed editions of Visual Studio (not Visual Studio Community), the sign in handles licensing.

On the previous screen it is possible to click on "Sign in" or "Not now, maybe later." Once a user is signed in or if they choose not to, the following is displayed:



Clicking on the "Development Settings" on the previous screen reveals the following:


Obviously, a C# developer should select "Visual C#" and then click on "Start Visual Studio" to launch Visual Studio Community edition.

Using Visual Studio

Microsoft Virtual Academy (see the following link: Microsoft Virtual Academy) provides numerous free, online classes that  that teach development skills. Of note is the class found at C# Fundamentals for Absolute Beginners. The second lecture, "02 | Installing Visual Studio Express 2013 for Windows Desktop" is analogous to this article in that it presents the steps how to install Visual Studio Express. Obviously Visual Studio Express is the free version of that was released before Visual Studio Community Edition. 

The creation and organization of a project in Visual Studio Express is nearly identical to that of Visual Studio Community. The second, third and fourth lectures of C# Fundamentals for Absolute Beginners cover present a comprehensive overview of development a first project that can be applied to Visual Studio Community "03 | Creating Your First C# Program," "04 | Dissecting the First C# Program You Created" and "05 | Quick Overview of the Visual C# Express Edition IDE."







Sunday, October 12, 2014

C#'s yield Keyword

Introduction

The yield keyword in C# represents the only C# interview question I failed to answer -- "What does the yield keyword do in C#?" All I remembered is it had something to do with enumerators.

This post demonstrates the use of the C# keyword, yield. This also covers how to implement an IEnumerable and IEnumerator interface in support of using C#'s foreach keyword. Demonstrating IEnumerable will show the true power of the yield keyword. It takes significantly less code to implement an enumerator with yield than it does with IEnumerable/IEnumerator.

Example

The following code is just a loop that displays all the factorial values for the number 5 (where 5 is the value of the parameter passed to the Factorial method):

foreach (var factor in FactorialManager.Factorial(5))
{
  Console.WriteLine(factor);
}

The output is as follows:


Under the covers the Factorial method implements the IEnumerable or IEnumerable<int> interface and the compiler as part of the foreach keyword invokes IEnumerable.GetEnumerator which returns an IEnumerator or IEnumerator<int>  instance. The IEnumerable and IEnumerator interfaces can be implemented manually or can be implemented by taking advantage of the yield keyword.

Implementing IEnumerable/IEnumerator

The foreach keyword expects the FactorialManager.Factorial method to return a type that implements IEnumerable<int>. The implementation of the FactorialManager class is as follows:

class FactorialManager : IEnumerable<int>
{
  private int _factorialToCompute;

  public FactorialManager(int factorialToCompute)
  {
    _factorialToCompute = factorialToCompute;
  }

  public static IEnumerable<int> Factorial(int factorialToCompute)
  {
    return new FactorialManager(factorialToCompute);
  }

  public IEnumerator<int> GetEnumerator()
  {
    return new FactorialSupport(_factorialToCompute);
  }

  System.Collections.IEnumerator 
    System.Collections.IEnumerable.GetEnumerator()
  {
    return GetEnumerator();
  }
}

The previous code is not complex but it is verbose. The  Factorial method (a class factory) returns an instance of FactorialManager which implements IEnumerable<int>:

  public static IEnumerable<int> Factorial(int factorialToCompute)
  {
    return new FactorialManager(factorialToCompute);
  }


The FactorialManager class instance implemented IEnumerable's GetEnumerator method:

  public IEnumerator<int> GetEnumerator()
  {
    return new FactorialSupport(_factorialToCompute);
  }

GetEnumerator method returns an instance of FactorialSupport. The FactorialSupport class implements the IEnumerator<T> interface therefore it is an appropriate return value for the GetEnumerator method. The IEnumerator<T> interface is defined follows:

public interface IEnumerator<out T> : IDisposable, IEnumerator


The IDisposable requires IEnumerator  to implement:

void Dispose()

The Dispose is used to free unmanaged resources. A factorial implementation has no unmanaged resources so Dispose should just return and do nothing.

The IEnumerator requires IEnumerator<T>  to implement the following property:

T Current { get; }

The Current property will be values such as 1, 2, 6, 24 and 120 depending on the current value returned by the factorial computation. 

The IEnumerator requires IEnumerator<T>  to implement the following methods:

void Reset()
bool MoveNext()

The Reset method initializes the computation. The MoveNext moves to the next iteration. So if the value of Current was 6 (1 * 2 * 3) then MoveNext will set Current to 24 (1 * 2 * 3 * 4).

The FactorialSupport class is implemented as follows:

public class FactorialSupport : IEnumerator<int>
{
  private int _index;

  private int _factorialToCompute;

  private int _factorial;

  public FactorialSupport(int factorialToCompute)
  {
    if (factorialToCompute < 0)
    {
      throw new ArgumentException("Cannot compute factorial for " + 
                                  factorialToCompute.ToString());
    }

    _factorialToCompute = factorialToCompute;
    Reset();
  }

  public int Current
  {
    get { return _factorial; }
  }

  public void Dispose()
  {
    return; // nothing to do here. 
  }

  object System.Collections.IEnumerator.Current
  {
    get { return this.Current; }
  }

  public bool MoveNext()
  {
    if (_index > _factorialToCompute)
    {
      return false;
    }

    _factorial *= _index;
    _index++;

    return true;
  }

  public void Reset()
  {
    _index = 1;
    _factorial = 1;
  }
}

The previous code just implements an IEnumerator that returns factorial values using Current, MoveNext and Reset.

Implementing support for foreach using FactorialManager and FactorialSupport requires approximately seventy lines of code. This is a lot of code for something as trivial as a factorial computation. 

Implementing an Enumerator with yield

A method, property or operator that returns IEnumerable<int> or IEnumerable may contain the yield keyword. The yield keyword is placed before the break or return keywords and is used as follows.

yield return <expression>;
yield break;

An example where the yield keyword is marked in boldface is as follows:

public static IEnumerable<int> Factorial(int n)
{
  if (n == 0)
  {
    n = 1;
  }

  int value = 1;

  for (int i = 1; i <= n; i++)
  {
    value *= i;
    yield return value;
  }
}

static void Main(string[] args)
{
  foreach (var factor in Factorial(5))
  {
    Console.WriteLine(factor);
  }
}

The Factorial method above (approximately ten lines of code) is all this is required to implement the IEnumerable and IEnumerator interfaces required by foreach. The beauty of the yield keyword is that it instructs the compiler to implement:
  • IEnumerable.GetEnumerator
  • IEnumerator.Dispose
  • IEnumerator.Current
  • IEnumerator.MoveNext
  • IEnumerator.Reset

Conclusion

The yield keyword is not a .NET feature. It is a feature built into the C# compiler designed to making support foreach simpler for developers.

Saturday, October 11, 2014

SQL Server: Correlated Subqueries

The Question

I had an interview via web-meeting recently. I was given access to SQL Manager and I had to solve a set of TSQL programming problems. The first programming task they throw at me is a question, "What is a correlated subquery?" I said, "I do not know" and moved on. It turns out I knew what a correlates subquery was but I just did not know such queries were called that.

This post presents an overview of correlates subqueries in TSQL.

Subqueries

A subquery is just a portion of a query that is evaluated before main part of a query. To understand this, consider the following (from the same job interview):

SELECT *
FROM [TableA] AS A
  INNER JOIN [TableB] AS B
    ON A.[AID] = B.[AID]
  INNER JOIN [TableC] AS C
    ON A.[AID] = C.[AID]
  INNER JOIN [TableD] AS D
    ON A.[AID] = D.[AID]
  INNER JOIN [TableE] AS E
    ON A.[AID] = E.[AID]
WHERE [AName] = 'Smith'

The above query has no sub-query. The interviewer explained, "This query is suffering from poor performance. What would you do to optimize it?" The answer is obvious -- use a subquery to get only the required values from TableA before joining with TableB, TableC and TableD. The subquery that should get evaluated first is:

SELECT *
FROM [TableA] AS A
WHERE [AName] = 'Smith'

The optimized query, including the subquery in its entirety, is below where the subquery is shown in boldface:

SELECT *
FROM (
  SELECT *
  FROM [TableA] AS A
  WHERE [AName] = 'Smith') AS A
  INNER JOIN [TableB] AS B
    ON A.[AID] = B.[AID]
  INNER JOIN [TableC] AS C
    ON A.[AID] = C.[AID]
  INNER JOIN [TableE] AS E
    ON A.[AID] = E.[AID]
  INNER JOIN [TableE] AS E
    ON A.[AID] = E.[AID]

The subquery is executed by SQL Server's optimizer first. This will reduce the number of data values and will potentially improve performance when the outer query is executed. The previous query is a simple subquery or a non-correlated subquery.

Correlated Subqueries

A correlated subquery is a subquery that depends on values from the outer query. Technet covers correlated subqueries here Correlated Subqueries. To demonstrate correlated queries, consider a database with tables:
  • Player: this table holds a list of soccer players (football players for you non-Americans)
  • Goal: this table holds a list of goals scored by players
To demonstrate correlated subqueries, a query will be developed that shows all players who have not scored any goals:

SELECT P.[PlayerID], P.[PlayerName]
FROM [Player] AS P
WHERE NOT EXISTS (
  SELECT * 
  FROM [Goal] AS G 
  WHERE P.[PlayerID] = G.[PlayerID])

The outer query contains table Player aliased as P. The subquery contains table Goal aliased as G. The subquery references the table Player from the outer query so the subquery is a correlated subquery. The subquery in this case did not aid performance by reducing the results returned to the outer query. Performance may suffer when using a correlated subquery because the query has to be evaluated for ever row of the outer query.

So yes, I knew how to write a correlated subquery. I just did not know the definition. 


Implementing the query without using a Correlated Subquery

A LEFT JOIN in a subquery  can be used as follows to implement the same query -- all players who have not scored a single goal:

SELECT [PlayerID], [PlayerName]
FROM (
  SELECT P.[PlayerID], P.[PlayerName], G.[GoalID]
  FROM [Player] AS P
    LEFT JOIN [Goal] AS G 
      ON P.[PlayerID] = G.[PlayerID]) AS P
WHERE P.[GoalID] IS NULL

Conclusion

Yes, I moved onto the second interview.

Friday, October 3, 2014

Visual Studio Online (cloud hosted TFS): Accessing Visual Studio Online Bugs/Tasks from Excel

This post is a "how to" covering the steps required to access Visual Studio Online tasks using Excel.

Introduction

Visual Studio Online is a fairly young cloud-based application (released in 2013). With regards to tracking tasks and bugs it does support a variety of configurable reports. Excel by contrast is a more mature reporting generating and data formatting environment (release in 1987). So to take advantage of the Excel, an extremely mature product, Visual Studio Online supports Excel integration. Excel can be used to view tasks/bugs and can even handle the modification of tasks and the creation of new tasks. Excel can also handle bulk import so if you move from Jira (for example) export the bugs to CSV format and then import into Visual Studio Online using Excel.

Excel 2007 and later versions can interface with Team Foundation Service (TFS) and since Visual Studio Online is a cloud-hosted variant of TFS, your minimum Excel version is 2007.

When Excel connects to Visual Studio Online or TFS it uses queries in order to access work items. The general workflow for the interaction between Visual Studio Online and Excel is as follows:

1) Create a Query within the Visual Studio Online instance (web site) or using Team Explorer or using Visual Studio
2) Connect to Visual Studio Online (or TFS) via Excel
3) Retrieve the query results using Excel
4) Add/Modify/Delete work items using Excel
5) Publish changes from Excel to Visual Studio Online (or TFS)

The following shows the steps required in integrating Excel with Visual Studio Online:


The previous diagram is taken MSDN's walk through of how to integrate Excel and Visual Studio Online (Work in Microsoft Excel and Microsoft Project connected to Team Foundation Server). Microsoft's write up is good but it is not as detailed as this posting. Even a person who does not use Visual Studio Online daily (a manager, a product manager, ad hoc QA, et al.) will find every step required to access Visual Studio Online from Excel by following what is documented here.

Signing up for a Visual Studio Online instance was covered by a previous post: Signing up for Visual Studio Online (cloud-based Team Foundation Server).

Prerequisite: Create an Query in Visual Studio Online

As stated previously Excel accesses Visual Studio Online work items through Visual Studio Online queries. Queries are associated with a Visual Studio Online project instance. To view all the queries associated with a Visual Studio Online project perform the following steps:

1) In Internet Explorer navigate to the instance of Visual Studio Online using the instance's URL (the instance in this case is https://AdmiralGraceHopper.visualstudio.com/):


2) If the credentials for the appropriate Microsoft account associated with the Visual Studio Online instance have not been entered, a user will be prompted to enter them:


3) Once the Microsoft Account credentials have been entered for the Visual Studio Online instance, the browser will be redirected to the main screen for the instance:


4) Under "Recent projects & teams" a list of projects is displayed. For this example the project MarkI is selected. If the desired project is not visible under the most recent list, click on the Browse button to select the appropriate Visual Studio Online project:


6) The MarkI project is shown above. To view the queries associated with the instance click on the WORK menu (not the Work "How to" help entry):


7) When the WORK menu item is selected the Backlogs and Queries tabs are visible. By default Queries are visible as follows:


The previous screenshot shows the default queries of the Mark1 project. These are the queries will ultimately be visible to an Excel workbook when accessing the Visual Studio Online instance https://AdmiralGraceHopper.visualstudio.com and the Mark1 project. 

Additional queries can be created for use in Visual Studio Online or to be accessed via Excel by clicking on the New dropdown and selecting New query:


For this example (using Excel to access Visual Studio Online) the default queries for the MarkI project will be used.

Connecting Excel to Visual Studio Online

The following steps are required to support Visual Studio Online's integration with Excel:

1) Install Team Explorer (see the previous post Visual Studio Online (cloud-hosted TFS) for non-Visual Studio Developers). If Visual Studio is installed this step can be skipped as Visual Studio includes the TFS Excel add-in.

2) Launch Excel 2007 or any later version and create a new "Blank worksheet" which appears as follows in Excel 2013:


3) Select the TEAM ribbon which is as follows:


4) If the Team ribbon is not visible, see the section at the end of this posted "Re-enabling the TEAM Ribbon"

5) To connect to Visual Studio Online or TFS click on the TEAM | New List button which causes the Connect to Team Foundation Server dialog to be displayed:


6) From the Connect to Team Foundation Server dialog click on the Servers button thus displaying the Add/Remove Team Foundation Server dialog:


7) From the Add/Remove Team Foundation Server dialog click on the Add button thus displaying the Add Team Foundation Server dialog:


8) Under the textbox labeled, "Name or URL of Team Foundation Server:" enter the URL associated with the desired Visual Studio Online instance (for this example the Visual Studio Online URL is https://AdmiralGraceHopper.visualstudio.com/):



9) Once the Visual Studio Online instance URL is specified, click on OK thus displaying a "Sign in" dialog to sign into said Visual Studio Online instance where the appropriate Microsoft account ID and password can be entered:


10) Enter the Microsoft account name and password:



11) Click on the Sign In button:



12) When a valid Sign In credentials are entered then the Add/Remove Team Foundation Server is displayed again with the freshly entered Visual Studio Online URL highlighted. Simply click on Close:



13) From the Connect to Team Foundation Server dialog, select the appropriate Team Project (e.g. MarkI) and click on Connect.

At this stage Excel is connected to a Visual Studio Online project but has yet to retrieve work items using a Visual Studio Online query.

Select a Query to Import into Excel

Once a connection is established using the Connect to Team Foundation Server dialog (initially displayed by clicking on the New List button on the TEAM ribbon), the New List dialog is displayed:



Clicking on the ... button next to Query List drop down reveals the Select Query dialog:



Expanding the folders in the Select Query dialog reveals all the queries from the MarkI project:


Select the Product Backlog query and click the Select Query dialog's OK button. With the Select Query dialog closed the New List dialog is active again:


Clicking on the OK button of the New List dialog will cause Sheet 1 of the workbook to retrieve the work items associated with the Mark1/Shared Queries/Product Backlog query:


Re-enabling the TEAM Ribbon

1) In Excel click on the File menu (it is not a ribbon as no ribbon is displayed when File is clicked on):


2) Click on Options thus displaying the Excel Options dialog:



3) From the categories along the left side of the dialog, select Add-Ins:


4) Notice under "Active Application Add-Ins" that there is no add-in named "Team Foundation Add-in". To enable the Team Foundation Add-in select "Com Add-Ins" from the Manage drop down and click on Go:



5) This displays the COM Add-Ins dialog:



6) Click on the checkbox next to the Team Foundation Add-in entry and click on OK:


7) Clicking on OK returns to the workbook view of Excel where the TEAM menu entry should be visible (see above). This means the TEAM capabilities are enabled since Team Foundation Add-In is enabled.

Subsequently selecting File | Options | Add-In displays the Excel Options | Add-Ins where the Team Foundation Add-In is listed under Active Application Add-ins: