TypeInitializationException popping up every time Linqpad 5 starts

Lately on every startup of Linqpad 5 v5.33.10 on Windows 7
I'm getting the following exception that will not stop popping up
TypeInitializationException: The type initializer for 'System.Composition.Hosting.Core.ExportDescriptorProvider' threw an exception.

Looking in Regedit (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full) I see that
the REG_DWORD value is 461814
where according to MS :
.NET Framework 4.7.2 installed on all other Windows OS versions 461814

What am I doing wrong?
is the framework too high ?

Thx

Comments

  • Here's the log result:

    System.TypeInitializationException: The type initializer for 'System.Composition.Hosting.Core.ExportDescriptorProvider' threw an exception.

    at System.Composition.Hosting.Providers.Lazy.LazyExportDescriptorProvider.GetExportDescriptors(CompositionContract exportKey, DependencyAccessor definitionAccessor)
    at System.Composition.Hosting.Core.ExportDescriptorRegistryUpdate.GetPromises(CompositionContract contract)
    at System.Composition.Hosting.Core.DependencyAccessor.TryResolveOptionalDependency(Object site, CompositionContract contract, Boolean isPrerequisite, CompositionDependency& dependency)
    at System.Composition.Hosting.Core.ExportDescriptorRegistryUpdate.Execute(CompositionContract contract)
    at System.Composition.Hosting.Core.ExportDescriptorRegistry.TryGetSingleForExport(CompositionContract exportKey, ExportDescriptor& defaultForExport)
    at System.Composition.Hosting.Core.LifetimeContext.TryGetExport(CompositionContract contract, Object& export)
    at System.Composition.Hosting.CompositionHost.TryGetExport(CompositionContract contract, Object& export)
    at System.Composition.CompositionContextExtensions.SatisfyImportsInternal(CompositionContext exportProvider, Object objectWithLooseImports, AttributedModelProvider conventions)
    at System.Composition.CompositionContextExtensions.SatisfyImports(CompositionContext compositionContext, Object objectWithLooseImports)
    at Microsoft.CodeAnalysis.Host.Mef.MefHostServices.Microsoft.CodeAnalysis.Host.Mef.IMefHostExportProvider.GetExports[TExtension,TMetadata]()
    at Microsoft.CodeAnalysis.Host.Mef.MefWorkspaceServices..ctor(IMefHostExportProvider host, Workspace workspace)
    at Microsoft.CodeAnalysis.Host.Mef.MefHostServices.CreateWorkspaceServices(Workspace workspace)
    at Microsoft.CodeAnalysis.Workspace..ctor(HostServices host, String workspaceKind)
    at Microsoft.CodeAnalysis.AdhocWorkspace..ctor()
    at t8b3E0XpAlakCQYWM3.tD4sYnJ5njgfhNSCqu.DMPCNr7ki(Object )
    at t8b3E0XpAlakCQYWM3.tD4sYnJ5njgfhNSCqu.rSVrUfNaOjpbHQTVd8g(Object )
    at t8b3E0XpAlakCQYWM3.tD4sYnJ5njgfhNSCqu..ctor(EditorServicesOptions )
    at LINQPad.LanguageServices.EditorServices.Create(EditorLanguage language, EditorServicesOptions creationOptions)
    at LINQPad.UI.QueryEditor.get_Services()
    at LINQPad.UI.QueryControl.d__494.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_1(Object state)
    at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
    at System.Threading.ThreadPoolWorkQueue.Dispatch()
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

    INNER EXCEPTION:
    System.BadImageFormatException: Could not load file or assembly 'System.ObjectModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.

    at System.Composition.Hosting.Core.ExportDescriptorProvider..cctor()
  • SOLVED ...... I dumped .NET Framework 4.7.2 and got .NET Framework 4.7
    works now
  • LINQPad should run fine on .NET Framework 4.7.2 (I'm running it myself). Perhaps the installation was corrupt?
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!