-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Unable to use REST client with .Net Framework due to strong naming #342
Comments
I noticed the same issue for .net 452 tests indeed. For the next major version 1.1.0 I'll remove the dependency on RestEase and move this to a new project, you can already take a look here: |
Thanks for information. Looking forward to the new version. It does not seem that RestEase is going to have strong name in nearest future. |
@vitaliydavydiak |
I have the same issue with WireMock.Net.RestClient 1.1.10 and .NET 4.7.2. Please follow the steps to reproduce:
The project builds, but when try to execute (Ctrl+F5) the following error is returned: Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'RestEase, Version=1.4.10.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044) Is there something I can do to use the REST client at all? |
This has been discussed with RestEase (canton7/RestEase#50) Maybe a workaround like https://github.com/dsplaisted/strongnamer can help you? |
StrongNamer doesn't help, nothing changes. |
You could use |
Thanks, that worked! |
Thanks I did add this to wiki. BTW you can also create a dotnet core console app and change the framework to net472 ; this will also work and no need to use strongnamer |
Hi,
The proiblem seems to be due to this changes.
The WireMock.Net assembly has strong name while RestEase still not. The StrongNamer workaround does not seem to work anymore.
It means that even own WireMock.Net tests (FluentMockServerAdminRestClientTests) for net452 target would fail now. It is unable to load RestEase w/o strong name (as well as signed with StrongNamer). It seems to be some framework bug since it fails on reflection code from RestEase itself (which is already loaded w/o strong name).
Do you know any other workarounds for this or just have to deal with it?
The text was updated successfully, but these errors were encountered: