Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load file or assembly 'FSharp.Core, Version=4.3.1.0 #1232

Closed
PvlD opened this issue Nov 26, 2018 · 8 comments
Closed

Could not load file or assembly 'FSharp.Core, Version=4.3.1.0 #1232

PvlD opened this issue Nov 26, 2018 · 8 comments

Comments

@PvlD
Copy link

PvlD commented Nov 26, 2018

VS2017 , the same issue on Windows 10 , Windows Server 2016 , Windows Server 2019,

image

($exception).FusionLog:

=== Pre-bind state information ===
LOG: DisplayName = FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Internet Explorer/
LOG: Initial PrivatePath = NULL
Calling assembly : FSharp.Data, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null.

LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

image

@kdurkin77
Copy link

I'm also having this issue. Any fix?

@PvlD
Copy link
Author

PvlD commented Apr 18, 2019

I don't know. Project was discontinued.
It was used in IE extension , officially they not support managed code .

@fischgeek
Copy link

I'm seeing this issue when I try to open FSharp.Data.HttpRequestHeaders and reference it in code. My entire project breaks until I remove references to that specific library. Any thoughts on this?

@PvlD
Copy link
Author

PvlD commented Apr 15, 2020

Sorry,
can't help you.
The issue was not resolved.

@smoothdeveloper
Copy link
Contributor

@fischgeek this is probably a binding redirects issue, you may have several F# libraries / projects depending on different versions of FSharp.Core.

https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/redirect-assembly-versions

The general fix is to adjust app.config with a binding redirect declaration unifying the version of FSharp.Core (or any library that clashes) to the one that your application ships.

@fischgeek
Copy link

fischgeek commented Apr 15, 2020

@smoothdeveloper - Thanks for the reply. I still think FSharp.Data is using an old version of .Core. I spent a lot of time trying to isolate the issue.

So, I unloaded all attached F# projects and built the main project (web project). I referenced only 1 F# library project (just a few helper methods). One helper method is using FSharp.Data.HttpRequestHeaders.

With the library as-is running on the latest .Core version, the build succeeds but the site throws the code dump screen.

When I comment out the 1 line that references FSharp.Data.HttpRequestHeaders the site works.

Interesting, right?

EDIT: Here is my binding redirect in the F# lib.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="4.7.1.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

@dsyme dsyme closed this as completed Aug 15, 2022
@dsyme
Copy link
Contributor

dsyme commented Aug 15, 2022

@cartermp We should go through and clean out old issues for this repo.

@cartermp
Copy link
Collaborator

@dsyme sounds gouda me, wanna find time for a zoom or teams call to just collab on it sometime this week or next?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants