Hi, I have recently stumbled across this project, and was very keen to try applying FluentAssertions to NSubstitute verifications, but I am getting the following error when I try to run my tests:
System.IO.FileLoadException : Could not load file or assembly 'NSubstitute, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I have tried adding assembly binding redirects for NSubstitute as follows:
<dependentAssembly>
<assemblyIdentity name="NSubstitute" publicKeyToken="92dd2e9066daa5ca" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
I am using NSubstitute 4.2.0 and FluentAssertions 5.7.0 with NUnit 3.12.0, and my application and tests are all based on .NET Framework 4.7.2. All my tests that don't use the Verify.That code pass, and if I rewrite my failing tests to not use Verify.That either then they pass.
Is there anything obvious that I am missing?
Hi, I have recently stumbled across this project, and was very keen to try applying FluentAssertions to NSubstitute verifications, but I am getting the following error when I try to run my tests:
I have tried adding assembly binding redirects for NSubstitute as follows:
I am using NSubstitute 4.2.0 and FluentAssertions 5.7.0 with NUnit 3.12.0, and my application and tests are all based on .NET Framework 4.7.2. All my tests that don't use the
Verify.Thatcode pass, and if I rewrite my failing tests to not useVerify.Thateither then they pass.Is there anything obvious that I am missing?