我做了基本的检查,比如没有网络驱动器上的文件夹,更改某些git配置设置,使用不同的repo,反病毒扫描等。
到目前为止,我知道问题与我的Windows帐户无关。在另一台设备上,只需几秒钟即可切换分支,而不是一分钟。我们注意到慢 PC上有更多的网络流量。
当我以安全模式运行Visual Studio时,
devenv.exe /SafeMode
我立即在团队资源管理器中看到以下错误:
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
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)
根据msdn的建议,我尝试的第一件事就是:
devenv.exe /updateConfiguration
但这并没有解决问题。然后我跑了:
devenv.exe /setup
它给出以下错误消息:
无法完成操作。请求的操作需要 标高。
devenv.exe /SafeMode /log D:\temp
我在日志中看到的错误是:
Error loading UI library for package WebEditorPackage. HrLoadNativeUILibrary failed with 0x800a006f.
Error loading UI library for package Microsoft.VsSDK.ExtensibilityProjectFlavor.ExtensibilityProjectFlavorPackage. HrLoadNativeUILibrary failed with 0x800a006f.
Failed to find CTMENU resource '#1000' in loaded UI library.
我以管理员身份运行Visual Studio。问题仍然存在,但我在以后的安全模式下以用户身份运行时,日志中不再有任何错误行。
我在常规启动时看到一个错误和许多警告:
ERROR Encountered an ArgumentException when trying to look up the key binding information for ({ef254ccf-cee3-43e9-a22c-3ae3ab08e7fe},256) in the scope {5efc7975-14bc-11cf-9b2b-00aa00573819}.
Unexpected system error mode before loading package [Microsoft.VisualStudio.Services.Promotions.PromotionsPackage]
Unexpected system error mode before loading package [InstallerPackage]
About to block on async service creation because the service was requested via GetService. This has the potential to deadlock. Async initializing services should be retrieved via GetServiceAsync.
PkgDef syntax or I/O error at line 1: Section header: additional characters after closing bracket
[$RootKey$\Setup\[ProductName]] 80004005 - E_FAIL
PkgDef syntax or I/O error at line 3: Section header: additional characters after closing bracket
"SrcPath"="[SourceDir]" 80004005 - E_FAIL
Could not process PkgDef file
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Community\Detection_Keys_Reg.pkgdef
Visual Studio修复也没有解决问题。我正在使用Visual Studio 15.6.5。
我运行了sfc来检查Windows系统文件。
sfc /scannow
Beginning system scan. This process will take some time.
Beginning verification phase of system scan.
Verification 100% complete.
Windows Resource Protection found corrupt files but was unable to fix some
of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For
example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not
supported in offline servicing scenarios.
有很多这样的错误:
CSI 000010f2 [DIRSD OWNER WARNING] Directory [l:48 ml:49]'\??\C:\Program Files\Windows Identity Foundation' is not owned but specifies SDDL in component c2wtsres, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}
CSI 000010f3 [DIRSD OWNER WARNING] Directory [l:53 ml:54]'\??\C:\Program Files\Windows Identity Foundation\v3.5' is not owned but specifies SDDL in component c2wtsres, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}
CSI 000010f4 Error - Overlap: Duplicate ownership for directory \??\C:\Program Files\Windows Identity Foundation in component c2wtsres, version 10.0.14393.0, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}
CSI 000010f5 Error - Overlap: Duplicate ownership for directory \??\C:\Program Files\Windows Identity Foundation\v3.5 in component c2wtsres, version 10.0.14393.0, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35}
Process Monitor日志显示Git和VS之间的切换。磁盘操作本身很快,但是在git.exe FileCloses C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin\git.exe
之后,它在关闭C:\Windows
之前几乎只需要一秒钟。在git.exe的QueryNameInformationFile事件后几乎一秒钟,它在C:\Windows\System32\conhost.exe
上执行CloseFile。
当没有什么特别的事情发生时,我做了Wireshark捕获。我看到我的PC和webdefence.cluster-x.websense.net(公司代理)之间有很多流量。流量特别高于我的同事,他们没有看到错误。
使用有线,无线或在家中使用VPN连接时问题保持不变。
我怀疑这是NTFS权限的问题吗?
我尝试运行SFCFix无济于事。
SFCFix Has Crashed
Something has gone horribly wrong and SFCFix has crashed. Would you like SFCFix
to submit a crash report to the developer so that this problem can be fixed?
Type "y" for yes or "n" for no and press enter to continue:
我尝试的其他工具也没有成功。
D:\Tools>DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
Deployment Image Servicing and Management tool
Version: 10.0.14393.0
Image Version: 10.0.14393.0
[=========== 20.0% ]
The operation completed successfully.
D:\Tools>Dism /Online /Cleanup-Image /RestoreHealth
Deployment Image Servicing and Management tool
Version: 10.0.14393.0
Image Version: 10.0.14393.0
[==========================100.0%==========================]
Error: 0x800f081f
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.
The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
Tweaking.com - Windows Repair 2018无法修复文件权限。
答案 0 :(得分:0)
这可能是此Lenovo L460 - e-ID reader i7 SSD
中的硬件问题。
系统重新开始。证监会发现了一些错误并可以修复它们。 Wireshark的流量看起来很正常,但问题仍然存在。第一次登录系统的同事也有同样的问题。
我注意到的另一件事是当Opera浏览器启动时,在第一分钟内无法显示新的网页。该网站的加载时间很长。
答案 1 :(得分:0)
删除此目录中的“ Git”文件夹,然后重新启动VS
C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Community \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TeamFoundation \ Team Explorer
该文件夹将覆盖您正常的Git执行。
PS:如果使用的不是“ Community”版本,则进行相应修改。 干杯