0

I have upgraded my project to the latest FluentAssertions and got a weird compilation error on the following line:

myArray.Should().Equal(new int[] { 0, 0, 1, 2, 3, 4, 5 });

The error is:

'System.Array' does not contain a definition for 'Should' and no extension method 'Should' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

SiberianGuy
  • 24,674
  • 56
  • 152
  • 266

1 Answers1

1

The minimum .NET runtime supported by FA v3.0 is .NET 4.0.3 (which is .NET 4.0 Update 2). In other words, you need to re-target the unit test project to .NET 4.0.3. If you are using Visual Studio 2013, then you already have .NET 4.5 installed and that framework supersedes 4.0.3.

Dennis Doomen
  • 8,368
  • 1
  • 32
  • 44
  • Just a heads up. In the upcoming release 3.1, thanks to the new Shared Projects feature of VS2012.3, we've re-enabled support for plain old .NET 4.0. – Dennis Doomen Jul 14 '14 at 06:17