ReflectionTypeLoadException when attempting to run C# Program

edited June 2017
For the last few betas (5.22.08 & 5.22.09 for example), I've been getting an error when attempting to run a "C# Program" (works with "VB Program").

When selecting "C# Program" and running it, even if empty, I get "ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information." on top of the statement window.

The loader exceptions provide the following detailed messages:

Could not load file or assembly 'System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Could not load file or assembly 'file:///C:\Users\**my user name here**\AppData\Local\Temp\LINQPad5\_sqqueioa\shadow_tvtvld\system.collections.immutable.dll' or one of its dependencies. The system cannot find the file specified.

Comments

  • If you press F4, are any additional reference assemblies displayed?

    Also, go to Edit | Preferences | Folders and under 'Plugins and Extensions', take a look at what folder you have selected. Are there any DLLs in that folder?

  • Looks like I had the "LINQPad.CodeAnalysis.1.3.0-rc1" plugin still in the plugins directory. And "Microsoft.CodeAnalysis.CSharp.dll" was causing the malfunction. I removed that plugin entirely (especially since I just read that LINQPad.CodeAnalysis is part of LINQPad now anyway). Everything works again. Thanks for pointing me in the right direction.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!