Comments (4)
Is it possible for you to release a version of you library in .NET framework? This will probably solve the issue since a had a whole bunch of similar problems with other libraries when my project was targeting .NET standard. Those went away when I went back to .NET framework.
from ecobee.
.NET Standard is the way forward for the ecosystem at this point, so that would be a step backward. I can confirm that the NuGet package works just fine on a 4.6.1 framework project, so I'm confident in the implementation here.
The error in question means that your project is referencing an old version of the Json.NET library somewhere in your app and its conflicting. Likely if you look in your bin directory, you'll find the version of the library that is being copied is not the one you are expecting. In these cases, you have to look at all of the references across all your projects and find the mismatch. If its a NUGET mismatch, you can actually right click on the solution and go to "Manage nuget packages", and it'll have a new tab at the top called "Consolidate" that will let you make sure the same version of the package is referenced across all your projects. If you manually added references to your projects though (note: you almost NEVER want to do that for this reason) then you are going to have to manually go check the version on the reference and remove it.
The assemblyBinding redirects are a hack that your top level application applies to make sure that any dependencies that need lower versions forward their calls to the newer version. If THAT is failing, I'm willing to bet your bad reference is in your top level application.
from ecobee.
I striped my project to nothing. No external assemblies, no nuget packages. No references to Neutonsoft. Nothing but a bare new project with no references added other than your lib and the default .NET references added by VS when creating a new project. I stripped my code down to a ridiculously looking few lines of code just enough to make a call to ecobee server. It still fails. The only conflict left possible is in your lib or within VB.NET itself.
Here is a link to this test harness. I would greatly appreciate it if you could look at it.
https://files.argowin.com/test.zip
from ecobee.
It appears that this is a known issue that you just have to deal with: https://www.hanselman.com/blog/ReferencingNETStandardAssembliesFromBothNETCoreAndNETFramework.aspx
Basically, if you are referencing a .NET Standard project from a Framework project in a single solution, dependencies do NOT flow the same way they would in an all-framework or all-core solution.
By far your simplest answer is use NuGet here, because it's going to just handle all this for you. Otherwise you should be able to fix this by adding the NuGet reference for Newtonsoft.Json to any calling projects, or jumping though the hoops Scott mentions there of changing your project format, but that seems pretty hairy if you don't have a decent grasp of what it's doing.
from ecobee.
Related Issues (9)
- Make .NET Standard 2.0 compatible
- Changes to Ecobe authentication HOT 15
- "Object reference not set to an instance of an object" on PostAsync with a ThermostatUpdateRequest containing a SetHoldFunction. HOT 5
- Nullable fields declared as `int` values default to 0, causing validation errors when doing a POST to update the thermostat's HvacMode HOT 4
- Incorrect output in object Device HOT 1
- more examples HOT 16
- small change request HOT 25
- another small change request HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecobee.