simple-odata-client / Simple.OData.Client

MIT License
331 stars 197 forks source link

Failed to load Client.V3.Adapter (Mixed Frameworks) #580

Open kitsu opened 5 years ago

kitsu commented 5 years ago

I'm re-building an internal webapp that uses this library to communicate with SharePoint's ReST API. My new frontend is using ASP.Net Core2.2, and when I tried to use my existing data access layer I got errors about the client adapter not loading.

Note: one of the best features of Core2.2/Standard2.0 is that they can load assemblies targeting older full-framework versions (within reason).

I decided (with no evidence) that your dynamic loading was trying to pick the standard framework assembly, which NuGet hadn't download because the project was targeting 4.5.2. After gutting my csproj file and changing it to the new style, and then changing the target framework to netstandard2.0, everything is working again.

Judging from past issues: it seems like the dynamic version picker causes more problems than it solves, maybe you should just split V3 into a real separate project?

object commented 5 years ago

I am not sure understand the source of the problem. The library has tests for both full framework and .NET Core, and the tests pass. I will appreciate a sample project that reproduces your issue.