我将代码保存在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 ...然后它会立即更改为None。
我也开始收到VS启动时出现的错误消息(无法加载SccProviderPackage)(与here相同的错误)
但我不知道如何追求这条道路。
以下是VS日志文件中的一些相关行:
109 ERROR SetSite failed for package [SccProviderPackage]
110 ERROR End package load [SccProviderPackage]
...
683 Warning Unexpected system error mode before loading package [GitCollaborationPackage]
我已完成的故障排除:
我可以使用命令行git来做东西,我只是喜欢VS中的集成内容。任何想法出错(排除故障)或如何修复它?
答案 0 :(得分:9)
因此,在这种情况下,从管理员VS命令提示符运行devenv /resetuserdata
修复了我的问题...不确定原因或出现了什么问题,在运行此命令后,源控件开始工作。没有更多错误消息
喊出http://tech.trailmax.info/2014/01/vs-package-did-not-load-correctly/ 和jessehouwing帮助调试