mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Assembly load issue with WireMock.Net.RestClient on .NET 4.7.2 #279
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MissaouiChedy on GitHub (Jun 2, 2020).
I created a .NET 4.7.2 Console application in which I installed with nuget
WireMock.Net.RestClientversion1.2.12I have the following code in my
Mainmethod:The first call that creates an instance of the API fails with the following 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)'It seems that a strongly named assembly is required for full .NET framework projects.
Any pointers for workarounds or fixes?
@StefH commented on GitHub (Jun 3, 2020):
Can you take a look at https://github.com/WireMock-Net/WireMock.Net/tree/master/examples/WireMock.Net.Client.Net472 and check the differences?
@MissaouiChedy commented on GitHub (Jun 14, 2020):
@StefH Thank you for pointing out the .NET 4.7.2 example.
It seems that I was missing the
Brutal.Dev.StrongNameSignerpackage.Adding it solves the strong name issue.
@StefH commented on GitHub (Jun 15, 2020):
Ok. Good to hear.
There was also a WIKI page about this:
https://github.com/WireMock-Net/WireMock.Net/wiki/Could-not-load-file-or-assembly-RestEase