-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RestSharp and Newtonsoft JSON references #50
Comments
The problem lays with this commit: 468a16d |
There are issues with both of these libraries SNKs in the latest versions. When adding a SNK to EasyPost I had to downgrade the libraries. RestSharp actual becomes a new library called RestSharpSigned. Which is maintained separately. I'm not sure if the issues were fixed, but I can look and see if the issues were resolved. |
Any updates and a resolution for this issue? Edit: Nevermind. I downgraded my version to 2.1.2.1 to get around this for now. |
Since, RestSharp does not provide a signed version, and the signed version is imported with the same name, it causes issues with which RestSharp version gets used. It looks like I'll need to make a new project for the signed version of this library and revert the newest version. |
Any movement on this? |
I upgraded to the latest versions of both libraries in the newest release. Are you still having issues? |
I'm still seeing the issue after upgrading to the latest version of both.
There still seems to be a hard coded reference looking for version 100.0.0
of RestSharp
Regards,
Zubair
…On 31 December 2016 at 17:28:28, Andrew Tribone ***@***.***) wrote:
I upgraded to the latest versions of both libraries in the newest release.
Are you still having issues?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#50 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANX7v8dM5yGUhboJktbg7gK5RoF5xLSbks5rNpC8gaJpZM4KFp_x>
.
|
OK, here was my final (I hope) fix to this problem:
|
Having the same issue with Easy Post referencing Json.Net 6.0.2 where I have version 8.
Installing EasyPost from Nuget does not seem to mind that I am on a higher version. Had to downgrade Json.Net to 6.0.2 which was released nearly 3 years ago.. |
Any updates on this issue? I'm getting a RestSharp reference issue: Could not load file or assembly 'RestSharp, Version=100.0.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) any help will be appreciated. Thanks. |
My hacky fix is still working, let me know if you need any help trying it. |
Yes please
Thank you!
…Sent from my iPhone
On Feb 22, 2017, at 8:29 AM, Jennifer ***@***.***> wrote:
My hacky fix is still working, let me know if you need any help trying it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
See my post from Jan 20th and let me know where you're stuck. :) |
@black-orchid It worked! thank you. Now my only concern is keeping up with updates. how do you manage that? |
I'm sure you could probably fork the repo and then merge their changes into your branch on demand, but I haven't gotten around to it yet. :) |
For me, the problem went away after I installed the 'RestSharpSigned' package. |
In a new .Net Framework 4.6.1 project, referencing Easypost-Official (2.2.6) package, received the error @humbersoft solution worked, But @att14, Easypost needs to fix this issue, so additional packages do not need to be installed manually in the project that is calling the Easypost library or have to do some of the ugly workarounds described above. We have another production app that uses Easypost, and I'm afraid to upgrade based on these RestSharp and Newtonsoft reference issues that have been going on for the past 6+ months... |
I just released 2.3.0 which upgrades the dependencies for |
Since there have been no new reports of this, I'm going to close. If you continue to have issue please reopen with more details. |
I am still seeing the issue reported above where the EasyPost NuGet package still seems to have a hardcoded reference to RestSharp 100.0.0, even though it lists 105.2.3 as a dependency. This is with EasyPost-Official v2.3.0. When I install the NuGet package, it overwrites my existing reference to RestSharp 105.2.3 with a reference inside the EasyPost package folder that is version 100.0.0. |
@justintcgplayer I preformed the following actions.
using System;
using System.Collections.Generic;
using RestSharp;
using EasyPost;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
RestClient client = new RestClient();
client.Execute(new RestRequest());
ClientManager.SetCurrent("");
Address address = new Address() {
company = "Simpler Postage Inc",
street1 = "164 Townsend Street",
street2 = "Unit 1",
city = "San Francisco",
state = "CA",
country = "US",
zip = "94107",
verify = new List<string>() { "delivery" }
};
address.Create();
Console.WriteLine(address.id);
Console.ReadLine();
}
}
} Because this package is signed and the RestSharp team will not create their own signed version (restsharp/RestSharp#216) I am using RestSharpSigned. There is an open issue for the version numbers (restsharp/RestSharp#925). I don't believe it is an actual issue unless you are experiencing problems. You can see the Newtonsoft.JSON maintainer's reasoning for pinning the assembly version number (http://james.newtonking.com/archive/2012/04/04/json-net-strong-naming-and-assembly-version-numbers). I do the same thing in this package. If you look at the version of EasyPost-Official it will be 1.0.0.0. Let me know if you are having actual issues or if you run into errors regarding this and I will take a look. |
this issue should be fixed now if you update your EasyPost nuget package to 2.3.1.2. This is my PR that fixed the issue: #90 Long story short, the EasyPost nuspec was packaging the entire project and had the release build put all referenced assemblies in /lib/ and when you installed the EasyPost package, it would change the references for RestSharp and Newtonsoft to look in the /packaged/EasyPost****/lib/ directories instead of the RestSharp and Newtonsoft package directories. In 2.3.1.2, only EasyPost assemblies are included in the package and the nuget package properly references the RestSharpSigned package instead of the older RestSharp package (the project was referencing RestSharpSigned, but the nuspec incorrectly had RestSharp) IMPORTANT: It is possible and/or probable that when you upgrade to 2.3.1.2, you will need to go to and manually change your references to NewtonSoft and RestSharpSigned BACK to the relevant directories in your packages folder (i.e. /packages/NewtonSoft.Json.9.0.1/, /packages/RestSharpSigned.105.2.3/, respectively). |
Follow up. If you have any other nuget packages that rely on the UNSIGNED version of restsharp, you're about to endure a lot of pain because binding redirects won't work between the signed and unsigned versions/references. I understand why RestSharp didn't want to sign it, but it would have been a lot easier to deprecate the old nuget project and make RestSharpSigned the official one. If you're in this boat, you can do a few things:
My personal choice was to do option 3 as a temporary fix until I have time to do option 4 properly. What a horrible, horrible mess. With any luck the next version of .Net will gain AI consciousness and kill strong naming. |
Hello, Are there any official updates regarding this issue? We need to upgrade the EasyPost library due to TLS issues and this RestSharp versioning thing is preventing us from using the latest library. If anyone has some suggestions on what I can do to remedy this via Nuget install and not forking the code that would be great. |
RestSharp is now signed. I am upgrading to v106.4.2. Note that this only applies to .Net 4.5.2 and .Net Core. Please reopen if you continue to have issues. |
@att14 I'm currently using |
This library doesn't currently support 4.6. I can add support but that would be a different task. |
I already have those packages installed in their latest version (105.2.3 and 9.0.1) , but after adding EasyPost package to my project, they get overwritten by EasyPosts older own dll versions.
The text was updated successfully, but these errors were encountered: