I keep my code in git, integrated through the built in git tools in visual studio 2015. I'm running Windows 10.
Recently, my Team Explorer windows (usually showing my uncommitted changes or whatever) started showing this:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.TeamFoundation.Git.Provider.ServiceProviderExtensionMethods.EnsurePackageLoaded(IServiceProvider serviceProvider, Guid packageGuid)
at Microsoft.TeamFoundation.Git.Provider.ServiceProviderExtensionMethods.EnsureSccAndTfPackagesLoaded(IServiceProvider serviceProvider)
at Microsoft.TeamFoundation.Git.Provider.Settings.SettingsLinksSectionVS.Initialize(Object sender, SectionInitializeEventArgs e)
at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Initialize(Object context)
or several similar errors depending on which page I go to, like:
System.Exception: Exception of type 'System.Exception' was thrown.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
at Microsoft.TeamFoundation.Git.Provider.ServiceProviderExtensionMethods.EnsurePackageLoaded(IServiceProvider serviceProvider, Guid packageGuid)
at Microsoft.TeamFoundation.Git.Provider.ServiceProviderExtensionMethods.EnsureSccAndTfPackagesLoaded(IServiceProvider serviceProvider)
at Microsoft.TeamFoundation.Git.Provider.Repositories.GitTeamProjectExtendedInfoProvider.set_ServiceProvider(IServiceProvider value)
at Microsoft.VisualStudio.TeamFoundation.TeamExplorer.ConnectPage.ConnectPageVS.Initialize(Object sender, PageInitializeEventArgs e)
at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerPageHost.Initialize(TeamExplorerPageContext context)
I went check under setting (Tools-->Options--> Source control) and see that the Current source control plugin (which used to be set to git) is now "None". I click the dropdown and change it back to git... and it changes right back to None.
I've also started getting an error message that appears on VS launch (Unable to load SccProviderPackage) (same error as here)
But I don't know how to pursue that avenue.
Here is some relevant lines from the VS log file:
109 ERROR SetSite failed for package [SccProviderPackage]
110 ERROR End package load [SccProviderPackage]
...
683 Warning Unexpected system error mode before loading package [GitCollaborationPackage]
Troubleshooting I've done:
- Run a repair in Visual Studio.
- Changed the installation so that all optional items are installed
- Checked the system event log... nothing.
- Cleared the Visual Studio Component Model Cache
- Removed the GitHub Extension
- Completely Uninstalled Visual Studio (and all the other things like SQL tools and the program files dir) and re-installed
- Launched in safe mode
- Ran devenv /setup
I can use command line git to do stuff, I just liked the integrated stuff in VS. Any ideas what went wrong (troubleshoot) or how to fix it?