Microsoft Identity Extensions cannot be installed during installation of Visual Studio 2015

 

Symptoms

When you install Microsoft Visual Studio 2015 with Office Developer Tools or LightSwitch on a computer that has Microsoft SharePoint 2013 installed, you receive an error message that resembles the following:

Setup Completed.   
However, not all features installed correctly.  
Microsoft Identity Extensions  
Package failed.   

MicrosoftIdentityExtensionsPackageFailed
This issue occurs if one of the following conditions is true:

  • You install Visual Studio 2015 with Office Developer Tools or LightSwitch on a computer that has SharePoint 2013.
  • You install Office Developer Tools or LightSwitch on top of Visual Studio 2015 updates on a computer that has SharePoint 2013 installed.

If the Microsoft Identity Extensions feature is installed incorrectly, the check boxes for Office Developer Tools and LightSwitch are cleared in the Modify Wizard in Visual Studio (from Setup), even though the tools are installed.

Additionally, if you install an update for Visual Studio 2015 on top of a Visual Studio 2015 installation that has Office Developer Tools or LightSwitch installed, the update removes Office Developer Tools or LightSwitch.

Diagnosis

To determine whether you're experiencing this issue, view the setup log by clicking log file in the previous setup dialog box. If you're experiencing this issue, you will see the following information in the log:

"MUX:  ExecuteError: Package (WindowsIdentityExtensions_x64) failed: Error Message Id: 1316 ErrorMessage: The specified account already exists."  

Cause

This issue occurs because SharePoint 2013 installs Microsoft Identity Extensions, one of the dependency components for Office Developer Tools, with a per-user installation context.

When you install Visual Studio 2015 on a computer that has SharePoint 2013 installed, Visual Studio tries to install Microsoft Identity Extensions for all users. Because the Microsoft Identity Extensions MSI already exists with an installation context of per-user, Visual Studio cannot install the MSI for all users and therefore throws the following error:

“The specified account already exists” i.e an error code 1603 (ERROR_INSTALL_FAILURE)."  

When installation of the MSI fails, Visual Studio does not recognize that all its dependency components were installed successfully. Therefore, Visual Studio reports that Office Developer Tools and all the tool's dependent products are not installed.

Resolution

To fix this issue, remove the per-user installation of Microsoft Identity Extensions, and then reinstall it as a per-computer installation. To do this, follow these steps:

  1. Download Microsoft Identity Extensions from one of the following locations, depending on your environment:
  1. Open a command prompt as an administrator.
  2. Run the following command. This uses Windows Management Instrumentation tools to locate the package by the product code:
        wmic product get PackageName,IdentifyingNumber | findstr /i /c:"F99F24BF-0B90-463E-9658-3FD2EFC3C992"  
  1. Uninstall the product by running the following command:
        msiexec /x {F99F24BF-0B90-463E-9658-3FD2EFC3C992}  
  1. Install Microsoft Identity Extensions per-computer by running the following command:
        msiexec /i MicrosoftIdentityExtensions-64.msi ALLUSERS=1  

If the issue is resolved, you will experience one of the following:

  • If you have already installed Office Developer Tools or LightSwitch in Visual Studio 2015 RTM or one of the updates, the check boxes for these tools will be selected in the Visual Studio Modify Wizard from setup, as shown in the following screen shot:

MicrosoftIdentityExtensionsPackageSucceed

  • If you have not installed the tools, their installation will be completed successfully.