Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Experimental extension throws exceptions when normal version is installed #2006

@jcansdale

Description

@jcansdale

Version

  • GitHub Extension for Visual Studio version: All
  • Visual Studio version: 2015 and 2017

What happens

The GitHub for Visual Studio extension installs with the AllUsers option set to true. As well as installing for all users, this option will make the extension appear in all instances of Visual Studio (regular and Experimental).

When the extension is installed and launched from Visual Studio, the version in development will be installed into the Experimental instance. Most, but not quite all configuration from the AllUsers extension will be overridden by the version in development. Enough of the AllUsers version is left behind to cause confusing exceptions when the UI loads.

The most likely problem is that a BindingPath from the AllUsers version is still active (pointing to the extension under c:\Program Files (x86)\...). This can cause a mixture of assemblies from both version to be loaded. Another potential issue is when a package is removed from the version in development. Rather than disabling the package, the package from the AllUsers will be loaded instead.

How to fix

We need to prevent the AllUsers extension from installing itself in the Experimental instance. The fix is different in Visual Studio 2017 and 2015.

For Visual Studio 2017

On Visual Studio 2017 we need to uninstall the experimental extension and disable the AllUsers extension.

  1. Start Experimental Instance of Visual Studio 2017
  2. Using Tools > Extensions and Updates..., find GitHub for Visual Studio and select Uninstall
  3. Close all instances of Visual Studio
  4. Find the VSIX Installer dialog and select Modify
  5. Start Experimental Instance of Visual Studio 2017
  6. Using Tools > Extensions and Updates..., find GitHub for Visual Studio and select Disable (not Revert)
  7. Close Visual Studio
  8. Open GitHub for Visual Studio solution in Visual Studio 2017
  9. Right-click on GitHub.VisualStudio and Rebuild (don't skip this step!)
  10. Install and launch extension (F5)
  11. Check that warning dialog doesn't appear and extension is working

For Visual Studio 2015

On Visual Studio 2015 we need to uninstall the experimental extension and then uninstall the AllUsers extension.

  1. Start Experimental Instance of Visual Studio 2015
  2. Using Tools > Extensions and Updates..., find GitHub for Visual Studio and select Uninstall
  3. Click the Restart now button at the bottom
  4. Wait for Experimental Instance to restart
  5. Using Tools > Extensions and Updates..., find GitHub for Visual Studio and select Uninstall
  6. Close Visual Studio
  7. Open GitHub for Visual Studio solution in Visual Studio 2015
  8. Right-click on GitHub.VisualStudio and Rebuild (don't skip this step!)
  9. Install and launch extension (F5)
  10. Check that warning dialog doesn't appear and extension is working

NOTE: If you want to use the extension on your regular Visual Studio 2015 instance, install it using the DogfoodVsix extension. This will install for the current user only and won't impact the Experimental instance.

Related

Feedback

Don't hesitate to ask questions below or offer suggestions if the instructions aren't clear. Good luck with your extension development!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions