Visual Studio 2015 git错误输出

Aar*_*ron 8 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.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)
Run Code Online (Sandbox Code Playgroud)

或者几个类似的错误取决于我去的页面,例如:

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)
Run Code Online (Sandbox Code Playgroud)

我在设置(工具 - >选项 - >源代码控制)下检查并看到当前源控件插件(以前设置为git)现在是"无".我单击下拉列表并将其更改回git ...然后它会立即更改为None.

我也开始收到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] 
Run Code Online (Sandbox Code Playgroud)

我做过的故障排除:

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

我可以使用命令行git来做东西,我只是喜欢VS中的集成内容.任何想法出错(排除故障)或如何解决?

Aar*_*ron 9

所以在这种情况下devenv /resetuserdata从管理员VS命令提示符运行修复我的问题...不知道为什么或出现了什么问题,只是在运行此命令后,源代码控制开始工作.没有更多错误消息

大声呼喊http://tech.trailmax.info/2014/01/vs-package-did-not-load-correctly/和jessehouwing帮助调试

  • 我尝试了上面的内容,但最终在ActivityLog.xml文件中找到了解决方案.事实证明我已经从另一个文件夹中复制了(GIT)源代码并且找不到绑定,即使我没有打开解决方案.重命名文件夹允许我摆脱错误消息并选择Git作为我的源代码控制. (2认同)