G
Guangheng Xian
Guest
When I updated Visual Studio 2019 Community to 16.5.1, I ran into a few errors during the download process, and was unable to start up Visual Studio because "the settings package did not load correctly". I've been consistently getting this error since I updated Visual Studio and have no idea how to fix it.
I've attached the sections of ActivityLog.xml where the word "error" appears.
I've already tried these possible solutions without success:
<entry>
<record>57</record>
<time>2020/04/23 20:51:28.947</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [Settings Package]Source: 'mscorlib' Description: Could not load type 'Microsoft.VisualStudio.Shell.ProvideBrokeredServiceAttribute' from assembly 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
System.TypeLoadException: Could not load type 'Microsoft.VisualStudio.Shell.ProvideBrokeredServiceAttribute' from assembly 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
 at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
 at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
 at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
 at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
 at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
 at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
 at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
 at Microsoft.VisualStudio.Shell.Package.ScheduleToolboxItemDiscoveryFactoriesRegistrationIfNecessary()
 at Microsoft.VisualStudio.Shell.Package.Initialize()
 at Microsoft.VisualStudio.Shell.AsyncPackage.Initialize()
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
<guid>{A2863A10-2269-4D3F-9E38-149C15926E1D}</guid>
<hr>80131522</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>58</record>
<time>2020/04/23 20:51:28.978</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Settings Package](null)</description>
<guid>{A2863A10-2269-4D3F-9E38-149C15926E1D}</guid>
<hr>80131522</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>59</record>
<time>2020/04/23 20:51:28.978</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Settings Package]</description>
<guid>{A2863A10-2269-4D3F-9E38-149C15926E1D}</guid>
<hr>80131522</hr>
<errorinfo></errorinfo>
</entry>
Continue reading...
I've attached the sections of ActivityLog.xml where the word "error" appears.
I've already tried these possible solutions without success:
- Uninstall and reinstall VS
- Restart laptop
- Uninstall every instance of VS 16.5.1 and reinstall an earlier version (16.4.3) of VS
- Repair in VS Installer
<entry>
<record>57</record>
<time>2020/04/23 20:51:28.947</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [Settings Package]Source: 'mscorlib' Description: Could not load type 'Microsoft.VisualStudio.Shell.ProvideBrokeredServiceAttribute' from assembly 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
System.TypeLoadException: Could not load type 'Microsoft.VisualStudio.Shell.ProvideBrokeredServiceAttribute' from assembly 'Microsoft.VisualStudio.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
 at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
 at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
 at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
 at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
 at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
 at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
 at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
 at Microsoft.VisualStudio.Shell.Package.ScheduleToolboxItemDiscoveryFactoriesRegistrationIfNecessary()
 at Microsoft.VisualStudio.Shell.Package.Initialize()
 at Microsoft.VisualStudio.Shell.AsyncPackage.Initialize()
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
<guid>{A2863A10-2269-4D3F-9E38-149C15926E1D}</guid>
<hr>80131522</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>58</record>
<time>2020/04/23 20:51:28.978</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Settings Package](null)</description>
<guid>{A2863A10-2269-4D3F-9E38-149C15926E1D}</guid>
<hr>80131522</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>59</record>
<time>2020/04/23 20:51:28.978</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Settings Package]</description>
<guid>{A2863A10-2269-4D3F-9E38-149C15926E1D}</guid>
<hr>80131522</hr>
<errorinfo></errorinfo>
</entry>
Continue reading...