我将代码保存在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]
我已经完成的故障排除:
我可以使用命令行git来完成工作,我只是喜欢VS中的集成工作。任何想法出了什么问题(疑难解答)或如何解决?
因此,在这种情况下,devenv /resetuserdata
从管理员VS命令提示符处运行解决了我的问题...不知道为什么或出了什么问题,就在运行此命令后,源代码控制才开始起作用。没有更多错误消息
向http://tech.trailmax.info/2014/01/vs-package-did-not-load-correctly/大喊大叫,并jessehouwing帮助调试
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句