-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Experimental extension throws exceptions when normal version is installed #2006
Description
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.
- Start Experimental Instance of Visual Studio 2017
- Using
Tools > Extensions and Updates..., findGitHub for Visual Studioand selectUninstall - Close all instances of Visual Studio
- Find the
VSIX Installerdialog and selectModify - Start Experimental Instance of Visual Studio 2017
- Using
Tools > Extensions and Updates..., findGitHub for Visual Studioand selectDisable(notRevert) - Close Visual Studio
- Open
GitHub for Visual Studiosolution in Visual Studio 2017 - Right-click on
GitHub.VisualStudioandRebuild(don't skip this step!) - Install and launch extension (F5)
- 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.
- Start Experimental Instance of Visual Studio 2015
- Using
Tools > Extensions and Updates..., findGitHub for Visual Studioand selectUninstall - Click the
Restart nowbutton at the bottom - Wait for Experimental Instance to restart
- Using
Tools > Extensions and Updates..., findGitHub for Visual Studioand selectUninstall - Close Visual Studio
- Open
GitHub for Visual Studiosolution in Visual Studio 2015 - Right-click on
GitHub.VisualStudioandRebuild(don't skip this step!) - Install and launch extension (F5)
- 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
- Ensure only one binding path for extension #1996: Ensure only one binding path for extension
- Resolve GitHub.VisualStudio.imagemanifest dependencies using ProvideBindingPath attribute #1236: Resolve GitHub.VisualStudio.imagemanifest dependencies using ProvideBindingPath attribute
Feedback
Don't hesitate to ask questions below or offer suggestions if the instructions aren't clear. Good luck with your extension development!