我遇到了 VS2017 和 Google Cloud 工具栏的问题。它以前可以工作,现在每次打开 VS2017 时都会弹出这个窗口。
“GoogleCloudExtensionPackage”包未正确加载。该问题可能是由配置更改或安装另一个扩展引起的。您可以通过检查文件“...\AppData\Roaming\Microsoft\VisualStudio\15.0_xxxxxxx\ActivityLog.xml”来获取更多信息。重新启动 Visual Studio 可以帮助解决此问题。
发布到 Google Cloud 选项也被禁用。尝试重新安装扩展和 VS。无论我重新启动、重新安装、修复多少次,它都不起作用。活动日志显示以下错误
LegacySitePackage failed for package [GoogleCloudExtensionPackage]
Source: 'mscorlib' Description: An item with the same key has already been added.
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at GoogleCloudExtension.Accounts.CredentialsStore.LoadAccounts() at GoogleCloudExtension.Accounts.CredentialsStore..ctor()
at GoogleCloudExtension.Accounts.CredentialsStore.<>c.<.cctor>b__67_0()
at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at GoogleCloudExtension.Accounts.CredentialsStore.get_Default()
at GoogleCloudExtension.GoogleCloudExtensionPackage.Initialize()
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
我也尝试删除以下文件夹
- C:\Users\\AppData\Local\Microsoft\VisualStudio\15.0xxxx
- C:\Users\\AppData\Roaming\Microsoft\VisualStudio\15.0xxxxx