From 310b6d380e0cbafd065f5c4bff86639433c1874e Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Sun, 15 Mar 2020 10:55:55 +0100 Subject: [PATCH] Updated Could not load file or assembly RestEase (markdown) --- Could-not-load-file-or-assembly-RestEase.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Could-not-load-file-or-assembly-RestEase.md b/Could-not-load-file-or-assembly-RestEase.md index bb7d4fb..8e3b461 100644 --- a/Could-not-load-file-or-assembly-RestEase.md +++ b/Could-not-load-file-or-assembly-RestEase.md @@ -1,8 +1,9 @@ -# Issues - -## Using WireMock.Net.RestClient in a .NET 4.x Full Framework project +## Issue When creating a .NET framework console app targeting .NET 4.7.2 and referencing the WireMock.Net.RestClient NuGet you get this exception when running the application: `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)` -This is because the WireMock.Net assemblies are signed, and RestEase is not signed. \ No newline at end of file +This is because the WireMock.Net assemblies are signed, and RestEase is not signed. + +## Solution +The solution is to add the NuGet [Brutal.Dev.StrongNameSigner](https://www.nuget.org/packages/Brutal.Dev.StrongNameSigner/) to your .NET framework console app.