Failed to install Visual studio extensions .VSIX
Asked Answered
S

2

5

I'm facing an error while trying to install/update any visual studio extension, I'm running Visual studio 2015 enterprise edition on Windows 7.

Install Log

12/12/2016 11:35:11 AM - Microsoft VSIX Installer
12/12/2016 11:35:11 AM - -------------------------------------------
12/12/2016 11:35:11 AM - Initializing Install...
12/12/2016 11:35:11 AM - Extension Details...
12/12/2016 11:35:11 AM -    Identifier         : EntityFramework_Reverse_POCO_Generator..d542a934-8bd6-4136-b490-5f0049d62033
12/12/2016 11:35:11 AM -    Name               : EntityFramework Reverse POCO Generator
12/12/2016 11:35:11 AM -    Author             : Simon Hughes
12/12/2016 11:35:11 AM -    Version            : 2.25.0
12/12/2016 11:35:11 AM -    Description        : Reverse engineers an existing database and generates EntityFramework Code First POCO classes, Configuration mappings and DbContext.
12/12/2016 11:35:11 AM -    Locale             : en-US
12/12/2016 11:35:11 AM -    MoreInfoURL        : https://efreversepoco.codeplex.com/
12/12/2016 11:35:11 AM -    InstalledByMSI     : False
12/12/2016 11:35:11 AM -    SupportedFrameworkVersionRange : [4.5,)
12/12/2016 11:35:11 AM - 
12/12/2016 11:35:11 AM -    SignatureState     : Unsigned
12/12/2016 11:35:11 AM -    References         : 
12/12/2016 11:35:11 AM - Signature Details...
12/12/2016 11:35:11 AM -    Extension is not signed.
12/12/2016 11:35:11 AM - 
12/12/2016 11:35:11 AM - Searching for applicable products...
12/12/2016 11:35:13 AM - Found installed product - Microsoft Visual Studio Enterprise 2015
12/12/2016 11:36:48 AM - The extension will be upgraded from version 2.24.0.
12/12/2016 11:36:48 AM - Found installed product - Microsoft Visual Studio Professional 2015
12/12/2016 11:36:48 AM - Found installed product - Microsoft Visual Studio Community 2015
12/12/2016 11:36:48 AM - Found installed product - Microsoft Visual Studio 2015 Shell (Integrated)
12/12/2016 11:36:48 AM - Found installed product - Global Location
12/12/2016 11:36:48 AM - Found installed product - ssms
12/12/2016 11:37:57 AM - The following target products have been selected...
12/12/2016 11:37:57 AM -    Microsoft Visual Studio Enterprise 2015
12/12/2016 11:37:57 AM - 
12/12/2016 11:37:57 AM - Beginning to install extension to Microsoft Visual Studio Enterprise 2015...
12/12/2016 11:37:57 AM - Upgrading 'EntityFramework Reverse POCO Generator', version 2.24.0 to version 2.25.0.
12/12/2016 11:37:59 AM - Install Error : System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.RemoveExtensionAutoUpdateSetting(String extensionIdentifier)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.UninstallInternal(IInstalledExtension extension, Boolean forceDelete)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CommitInstalledAndUninstalledExtensions(IEnumerable`1 installedExtensions, IEnumerable`1 uninstalledExtensions, IEnumerable`1 packComponentChanges)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.BeginInstall(IInstallableExtension installableExtension, Boolean perMachine, AsyncOperation asyncOp, Boolean enforceCertificateCheckForUpgrade)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallWorker(IInstallableExtension extension, Boolean perMachine, AsyncOperation asyncOp, Boolean enforceCertificateCheckForUpgrade)
12/12/2016 11:37:59 AM - Reverting uninstall of version 2.24.0 of the extension.

Any advice????

Schatz answered 12/12, 2016 at 10:24 Comment(6)
Try uninstalling the existing version manually (from Tools, Extensions & Updates)Arvizu
@Arvizu could uninstall it but when try to reinstall i got this message "This extension is already installed to all applicable products."Schatz
Remove manually from appdataArvizu
@Arvizu I've removed all files from appdata in the extensions folder then restarted VS but found that all extesions still exist. i will try to repair the whole VS :(Schatz
It is localappdata , sorry for confusionArvizu
Removing the package and re-installing it doesn't change the fact that the 'Upgrade' feature is broken. These products are destined for a Marketplace and we can't tell all the potential users of our products to just 'Re-install'. The issue is that the 'Upgrade' function is broken.Kempf
O
7

Do you have a file called MachineState.json in your <VS2015 Install Dir>/Common7/IDE/Extensions/ folder? If you do, try renaming it or deleting it.

Taking a look inside the Microsoft.VisualStudio.ExtensionManager.Implementation.dll assembly, in the function that's throwing the System.NullReferenceException, it looks looks like this:

private static void RemoveExtensionAutoUpdateSetting(string extensionIdentifier)
{
    AutoUpdateMachineSettings current = AutoUpdateMachineSettings.Current;
    if (current.Extensions.Keys.Contains<string>(extensionIdentifier))
    {
        current.Extensions.Remove(extensionIdentifier);
        AutoUpdateMachineSettings.Current = current;
    }
}

The AutoUpdateMachineSettings.Current field getter attempts to deserialize that JSON file, and I'm not sure how that works internally, but if it returns null when it fails, that could result in this exception.

The other possibility is that the input extensionIdentifier argument is null, which implies that the structure containing the extension's header information contains a null extension Identifier. The only way I could see this happening is if the on-disk extension cache became corrupt or broke or something, somehow. The cache files live in <User Dir>/AppData/Local/Microsoft/VisualStudio/14.0/Extensions/ and are the extensions.<locale>.cache and extensionSdks.<locale>.cache files. Try removing or renaming those files, and attempt the update again. They're cache files, so I'd assume that they'll safely be rebuilt when VS realizes they don't exist, and from what I can tell from a quick look at the code it seems that they just contain a bunch of binary metadata about the installed extensions.

If none of that works, perhaps you could attach a debugger to the installer, and then provide more information about the exception that's being thrown?

Oubliette answered 6/1, 2017 at 7:35 Comment(2)
Thanks for your effort, i've already changed the OS as it was very buggy :DSchatz
Thanks, in my case it was the Tizen extension who brokeSailor
G
0

For me , I copied the packages to local machine's folder --> give file sharing access to everyone --> click ok --> then install the package. Please note that you have to restart the Visual studio

Gondola answered 27/4, 2017 at 19:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.