MDK-SE: (VS'22) After installing the extension VS gives me the "package did not load correctly" error

I read in the release note that something with the cache creates this problem but it’s already my 10th time restarting VS and clearing caches that i don’t know what to do now

Here the error window: devenv_gKpsrmpY4m

And checking the logs it seems like it’s missing some files:

  <entry>
    <record>1998</record>
    <time>2023/04/30 15:17:00.211</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [MDKPackage]Source: &apos;mscorlib&apos; Description: Could not load file or assembly &apos;System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos;&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)&#x000D;&#x000A;   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)&#x000D;&#x000A;   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>
    <guid>{7B9C2D3E-B001-4A3E-86A8-00DC6F2AF032}</guid>
    <hr>0x80004005 - E_FAIL</hr>
    <errorinfo></errorinfo>
  </entry>

Full log

I thought that i might have missed some components during the installation process but it seems like I’ve got them all (it’s not only these but they are the required ones in the get started doc) Installed components:

  • .NET desktop development
  • .NET 4.6.1 targeting pack
  • .NET 4.8.1 targeting pack
  • .NET SDK

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

It’s too late for me to do anything now but I have one thing I can try. Will do so tomorrow.

All good now 😃

If you just want to get your work done, and don’t really want to be bothered with issues like these, you could always fall back to the latest release (for VS’19) for now. No judgement from me. This prerelease is bound to have problems. However, I’ll be grateful for testing as I won’t be able to fix this without getting feedback.

VS’19 and VS’22 can be installed side-by-side.

Oh, you’re saying you get the error with a new install.

Crap.

How nice of VS to be consistent.