question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not load file or assembly 'TypeShape, Version=8.0.1.0'

See original GitHub issue

Description

Retrieving the config fails with Could not load file or assembly 'TypeShape, Version=8.0.1.0,...

Repro steps

  1. Create a new project referencing FsConfig
  2. Create a config record type and use the default match expression from the docs to retrieve the config

Expected behavior

Config gets successfully retrieved.

Actual behavior

The following exception gets thrown:

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'TypeShape, Version=8.0.1.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'TypeShape, Version=8.0.1.0, Culture=neutral, PublicKeyToken=null'
   at FsConfig.Core.parseInternal[T](IConfigReader configReader, FSharpFunc`2 fieldNameCanonicalizer, FieldValueParseArgs args)
   at Program.main(String[] argv) in

Known workarounds

Add TypeShape directly to the project:

    <PackageReference Include="TypeShape" Version="8.0.1" />

Related information

  • Operating system: Ubuntu 18.04
  • FsConfig: 2.1.5
  • .NET Core 3.1.101

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
queilcommented, Jan 30, 2021

@tamizhvendan I’ve just published version 3.0.0. The problem looks solved now. Tested with the following Dockerfile:

FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim
WORKDIR /app
RUN dotnet new console -lang f# && dotnet add package FsConfig && echo '\n\
open System \n\
open FsConfig\n\
[<EntryPoint>]\n\
let main argv =\n\
  EnvConfig.Get<string>() |> ignore\n\
  printfn "- OK -"\n\
  0' \
> Program.fs && dotnet run
1reaction
demystifyfpcommented, Apr 15, 2020

It looks like I need some more time to troubleshoot this. I will get back to you this weekend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The provider is not compatible with the version of Oracle ...
I did however get a follow error message that states: Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies ...
Read more >
Announcing .NET Core 1.0
The 'dotnet' app host, which is used to launch . NET Core apps. It selects and hosts the runtime, provides an assembly loading...
Read more >
Can't seem to build Iosevka · Issue #380
6; Your make version: 3.81; Your results of npm list : ... I'm just trying to build a custom Iosevka using the examples...
Read more >
Release History — OpenFF Toolkit 0.9.2+0.g7c3dfbae.dirty ...
PR #634: Fixes a bug in which calling RDKitToolkitWrapper.from_file directly would not load files correctly if passed lowercase file_format .
Read more >
OpenFF Toolkit Documentation
The single- file installer packages an entire Conda distribution complete will all dependencies needed to run the Toolkit. These are provided ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found