fsprojects / FSharp.Azure.Storage

F# API for using Microsoft Azure Table Storage service
MIT License
75 stars 16 forks source link

Downgrade FSharp.Core to 4.7 #45

Closed daniel-chambers closed 3 years ago

daniel-chambers commented 3 years ago

While FSharp.Azure.Storage ostensibly supports being used with older FSharp.Core assemblies, I had upgraded the build to use 5.0. However, for some reason, when used with a .NET Core 3.1 project referencing FSharp.Core 4.7.2, I am receiving the following exception:

Could not load file or assembly 'FSharp.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)\r\nFile name: 'FSharp.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

For some reason I don't understand .NET Core's binding redirects do not seem to be taking care of this automatically. So I have downgraded the version we're building with to 4.7.0 in the hopes that this will resolve the problem.

daniel-chambers commented 3 years ago

I suspect it is because of the behaviour described here where .NET Core will only redirect when the version is higher. So because we built against 5.0, it wouldn't redirect 4.7.2 to 5.0.