I\'ve got a VS2017 project that compiles to a DLL which is then called by an EXE written by someone else. Both projects target .Net Framework 4.6.2. I rewrote one of my DLL
My issue was that I was developing against 4.6.1, but releasing on 4.7.2. Luckily I don't mind which .Net framework this project was built for, so I installed 4.7.2 on my developer instance, then upgraded all the Nuget packages.
(Using SQLite on AWS EC2)
I resolved this issue by installing System.ValueTuple from nuget. It was not previously installed but I guess RestSharp or another library is using it.
So this got it fixed.
In my case I think something delete this dll from project and framework folders, maybe during installing something it flied; so my project during debugging couldn't find that dll and throw that error. I installed
Install-Package System.ValueTuple -Version 4.5.0
Package and than everything worked again. Before doing further complicated solutions as described above answers may installing ValueTuple package works for you.
Solved it by installing .NET Framework 4.7.2 Runtime
on the machine the error occurred on. Simple and no need to add bindingRedirect
or downgrading NuGet packages.
https://dotnet.microsoft.com/download/dotnet-framework/net472
I had a library which used a newer version of the System.ValueTuple NuGet package. I then used another library which caused me to use the older version installed in the main project for the first time. That caused this exception to reveal itself. Updating both (or, converging them in any way - downgrading both is fine too) - fixed the issue.
I hade the same issue, i solve the probleme by changing the target framwork of the project to .Net Framwork 4.7.1.
System.ValueTuple now supports .NET Framework 4.7