JetBrains / YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
https://www.jetbrains.com/youtrack
Apache License 2.0
134 stars 105 forks source link

In F# project: System.Net.Http manifest definition does not match the assembly reference #60

Closed LukasBoersma closed 5 years ago

LukasBoersma commented 7 years ago

I want to use YoutrackSharp in my F# application. When I install the YoutrackSharp Nuget package and run my application, I get the following runtime error:

System.IO.FileLoadException:
'The File or Assembly "System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" or one of its dependencies could not be found.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'

I use .F# 4.1, NET Framework 4.7 and Visual Studio 2017 (15.3.5). The same exception occurs with other .NET frameworks (I tested 4.6.1)

Steps to reproduce:

  1. Create a new "F# Console Application" project in Visual Studio (with .NET Framework 4.7),.
  2. Install YoutrackSharp via the Nuget package manager (I installed v3.1.0)
  3. Make some API call somewhere in the program
  4. Build (no error)
  5. Run (API call fails with FileLoadException)

When I do the same in C#, everything works. Is this some kind of version conflict with a dependency from FSharp.Core? How could I debug this?

maartenba commented 7 years ago

Looks like a NuGet thing somehow... Can you reference that System.Net.Http manually and see if that works?

maartenba commented 5 years ago

Closing issue, feel free to re-open if this is still an issue.