TypeLoadExceptiong when using Nuget to add libraries

When adding a library via Nuget (F4 -> Add NuGet -> Json.NET -> Add to query) I get the following exception:
System.Reflection.ReflectionTypeLoadException

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more   information." on top of the statement window.
In the log file (%localappdata%\LinqPad\Logs\log.txt) the following stack trace can be found:
5.26.01(AnyCPU) 2018-03-22T12:48:42.5688581+01:00 SymbolManager - 
ArgumentException: Der Wert liegt außerhalb des erwarteten Bereichs.
   bei LINQPad.Reflection.Internal.LocalVariableNameReader.IMetaDataDispenser.OpenScope(String szScope, Int32 dwOpenFlags, Guid& riid, Object& punk)
   bei LINQPad.Reflection.Internal.LocalVariableNameReader.SymUtil.GetSymbolReaderForFile(SymBinder binder, String pathModule, String searchPath)
   bei LINQPad.Reflection.Internal.LocalVariableNameReader.SymUtil.GetSymbolReaderForFile(String pathModule, String searchPath)
   bei LINQPad.Reflection.Internal.LocalVariableNameReader..ctor(MethodBase m)
   bei LINQPad.Reflection.Disassembler..ctor(MethodBase method, ILStyler styler)
First chance data: LINQPad.Reflection.Internal.LocalVariableNameReader+IMetaDataDispenser.OpenScope(szScope,dwOpenFlags,riid,punk) offset=0xFFFFFFFF
   -LINQPad.Reflection.Internal.LocalVariableNameReader+SymUtil.GetSymbolReaderForFile(binder,pathModule,searchPath) offset=0xC1
   -LINQPad.Reflection.Internal.LocalVariableNameReader+SymUtil.GetSymbolReaderForFile(pathModule,searchPath) offset=0x6
   -LINQPad.Reflection.Internal.LocalVariableNameReader..ctor(m) offset=0x32
   -LINQPad.Reflection.Disassembler..ctor(method,styler) offset=0xAF
   -LINQPad.Reflection.Disassembler.Disassemble(method,styler,offsetFrom,offsetTo) offset=0x1E
   -LINQPad.Reflection.Disassembler.Disassemble(method,offsetFrom,offsetTo) offset=0x7
   -LINQPad.Program.GetStackInfo(ex) offset=0x117
   -LINQPad.Program.GetExceptionInfo(ex,depth) offset=0x28
   -LINQPad.GuiAppHost+<>c__DisplayClass14_1.<FaultInternal>b__0() offset=0x2
When looking inside the directory %localappdata%/Nuget.FW46 the nuget packages are downloaded.

The same behaviour can be observed, when an older query is opened where the Json.NET is referenced. The error shows up as soon as LinqPad tries to reload/update the Nuget packages.

Please could you provide some additional help as to why the operation failed, i.e. retrieving the loader exceptions and displaying them. I suspect an environmental issue as the older scripts worked fine about 2 weeks ago.

BTW, the issue also occurrs when a folder based Nuget source is used.

Thank in advance for any help provided.
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!