Visual Studio 2015 Git错误

亚伦

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

最近,我的Team Explorer窗口(通常显示我未提交的更改或其他内容)开始显示以下内容:

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启动时显示的错误消息(无法加载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] 

我已经完成的故障排除:

  1. 在Visual Studio中运行修复。
  2. 更改了安装,以便安装了所有可选项目
  3. 检查系统事件日志...什么都没有。
  4. 清除了Visual Studio组件模型缓存
  5. 删除了GitHub扩展
  6. 完全卸载Visual Studio(以及所有其他东西,例如SQL工具和程序文件dir),然后重新安装
  7. 以安全模式启动
  8. Ran devenv /设置

我可以使用命令行git来完成工作,我只是喜欢VS中的集成工作。任何想法出了什么问题(疑难解答)或如何解决?

亚伦

因此,在这种情况下,devenv /resetuserdata从管理员VS命令提示符处运行解决了我的问题...不知道为什么或出了什么问题,就在运行此命令后,源代码控制才开始起作用。没有更多错误消息

http://tech.trailmax.info/2014/01/vs-package-did-not-load-correctly/大喊大叫,并jessehouwing帮助调试

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章