Visual Studio 2015 git出错

Visual Studio 2015 git出错,git,visual-studio,visual-studio-2015,Git,Visual Studio,Visual Studio 2015,我将代码保存在git中,通过visual studio 2015中内置的git工具进行集成。我正在运行Windows 10 最近,我的团队资源管理器窗口(通常显示未提交的更改或其他内容)开始显示以下内容: System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. at System.Runtime.

我将代码保存在git中,通过visual studio 2015中内置的git工具进行集成。我正在运行Windows 10

最近,我的团队资源管理器窗口(通常显示未提交的更改或其他内容)开始显示以下内容:

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)
或者,根据我所处的页面,出现几个类似的错误,例如:

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)
我在设置(工具-->选项-->源代码管理)下进行了检查,发现当前的源代码管理插件(以前设置为git)现在为“无”。我点击下拉菜单并将其更改回git。。。它又变回无

我还开始收到一条出现在VS launch上的错误消息(无法加载SccProviderPackage)(与相同的错误)

但我不知道该怎么走这条路

以下是VS日志文件中的一些相关行:

109 ERROR SetSite failed for package [SccProviderPackage] 
110 ERROR End package load [SccProviderPackage] 
...
683 Warning Unexpected system error mode before loading package [GitCollaborationPackage] 
我所做的故障排除:

  • 在Visual Studio中运行修复
  • 已更改安装,以便安装所有可选项
  • 已检查系统事件日志。。。没什么
  • 清除
  • 删除了GitHub扩展
  • 完全卸载Visual Studio(以及所有其他工具,如SQL工具和程序文件目录),然后重新安装
  • 在安全模式下启动
  • 运行开发/安装程序

  • 我可以使用命令行git来做一些事情,我只是喜欢VS中集成的东西。有什么想法出了什么问题(疑难解答)或者如何修复吗?

    所以在本例中,从管理员VS命令提示符运行
    devenv/resetuserdata
    修复了我的问题。。。不知道为什么或者哪里出了问题,就在运行这个命令之后,源代码管理开始工作。没有更多的错误消息

    呼喊
    感谢jessehouwing帮助调试

    尝试更新GitHub扩展。出现了导致问题的问题。更新管理器没有显示任何可用的升级:我有GitHub扩展的1.0.12.1版,卸载它也没有帮助它在干净的git存储库上工作吗?您是否尝试过清除ComponentModel缓存?是否尝试在安全模式下启动Visual Studio?是否尝试删除Visual Studio扩展?我尝试了上述操作,但最终在ActivityLog.xml文件中找到了解决方案。事实证明,我从另一个文件夹复制了(GIT)源代码,但它找不到绑定,即使我没有打开解决方案。重命名文件夹使我能够摆脱错误消息,并选择Git作为源代码管理。我以管理员身份运行visual studio,这解决了我的问题。我在另一个项目中再次遇到同样的问题。但这一次,它是通过先推后拉树枝来修复的。。!!如果你只试着拉,它不会起作用。。!!