Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, April 23, 2020 10:07 PM
When I updated Visual Studio 2019 Community to 16.5, 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:
- 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>
All replies (8)
Tuesday, April 28, 2020 12:00 PM ✅Answered
Hey Anna,
A friend of mine just gave me a series of steps to try out, and now VS2019 is working again.
The steps to the solution were:
1) Go to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\PublicAssemblies
2) Delete Microsoft.VisualStudio.Shell.Interop.15.0.dll
3) Open Developer Command Prompt
4) CD to the PublicAssemblies folder
5) Run this command: "C:\ Program Files(x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\gacutil.exe" -i Microsoft.VisualStudio.Shell.15.0.dll
6) Run VS2019 as admin
Perhaps this solution, combined with the previous few, helped restore VS2019.
Thanks for helping me with this issue as well!
Yours truly,
Guangheng
Friday, April 24, 2020 7:44 AM
Hi Guangheng,
Welcome to MSDN forum.
Unfortunately, I can’t reproduce this issue and get more information from the ActivityLog to analyze the root cause of this issue. I need your help to provide us with more installation logs. Please download and run this collect.exe tool, go to %temp% folder and find the vslogs.zip file, upload it to https://onedrive.live.com/ and share the link in here. Thanks for your understanding.
>> The 'Settings Package' did not load correctly.
## Refer to the error message, I suggest you completely uninstall the VS2019 via troubleshooter. Then, please download and install the latest release of VS2019 from here (Notice that turn off any anti-virus software and clean the %temp% folder during installation). If it doesn’t work, you could have a look at this similar issue and take the advice of others to reinstall your VS2019 to another location.
Looking forward to hearing from you.
Best regards,
Anna
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]
Friday, April 24, 2020 10:49 AM
I was unable to find VS2019 in the troubleshooter to uninstall. Is it alright for you to send the product code for me to uninstall with the product code instead?
Also, here is the OneDrive link containing vslogs.zip: https://onedrive.live.com/?id=E990481ECC444E2A%2154875&cid=E990481ECC444E2A
Thanks
Friday, April 24, 2020 11:10 AM
Hi Guangheng,
Thanks for your update.
You could also refer to the following guide to uninstall your VS2019:
/en-us/visualstudio/install/uninstall-visual-studio?view=vs-2019
Unfortunately, I can't find the vslogs.zip via the link, please check and upload it again. If you don't upload your logs, please first verify your account:
Hoping everything goes well.
Sincerely,
Anna
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]
Friday, April 24, 2020 11:48 AM
Here is another link to where I uploaded vslogs.zip
https://1drv.ms/u/s!AipORMweSJDpg6xbkYwL2hjqasAPkg?e=nRjShc
I just uninstalled VS and VS Installer, going to reinstall the latest update now.
Friday, April 24, 2020 12:28 PM
I just reinstalled VS2019 Community with the .NET Desktop Development, and installed into another file location as well, but the same error about the Settings Package not loading correctly occurred again.
Image of error can be found here: https://i.imgur.com/J3Dupqj.png
Is there any way this could be fixed or am I screwed forever?
Tuesday, April 28, 2020 8:42 AM
Hi Guangheng,
Thanks for your feedback.
Refer to the error message, please close all instances of Visual Studio and delete the following folder:
C:\Users\OEM\AppData\Local\Microsoft\VisualStudio\16.0_91fede23\ComponentModelCache
Then, please restart your Visual Studio as administrator and check if this issue is resolved.
Hope it helps and any feedback will be expected.
Sincerely,
Anna
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]
Tuesday, April 28, 2020 11:35 AM
Hi Anna,
I followed your steps, deleting the ComponentModelCache folder and running VS2019 as admin, but the Settings Package error came up again.
I also think I should note something I did earlier, a few days before I updated VS2019 but instead got the Settings Package error. I had a problem with adding references, so I did the following in the "Developer Command Prompt for VS 2019" to fix my problem with adding references:
1) cd C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\PublicAssemblies
2) "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\gacutil.exe" -i Microsoft.VisualStudio.Shell.Interop.11.0.dll
Although this fixed the problem with adding references, I thought this would be worth nothing as it may also be the reason why VS2019 isn't working now.