Question

If I download FluentAssertions 1.7.1 (which all of my unit tests are currently written against) then I can do a reference to the dll and the test below will work just fine.

But I tried to upgrade via NuGet and using FluentAssertions versions 3.0.90 and also tried 3.0.107. I tried to make a brand new solution/Class Library project after running into problems, but it can't detect anything from the library...

The test below won't compile because the .Should extension method can't be found for bool... or anything else for that matter. But I can clearly see it exists in the Object Browser I can see FluentAssertions and FluentAssertions.Core in my assembly references, but only view FluentAssertions.Core in the Object Browser. The only thing Intellisence seems to find for extension methods is .ShouldRaisePropertyChangeFor<...> and .ShouldNotRaisePropertyChangeFor<...>.

My project targets .Net4.0 and at this point I'm thinking it's a config problem, but I'm not sure where to start looking if it is. No one else on Google seems to have this issue.

using System;
using FluentAssertions;
using NUnit.Framework;

namespace IntegrationTests.CommonTests
{
    [TestFixture]
    public class _BasicTemplate_Tests
    {
        [Test]
        public void Run_Basic_Test()
        {
            true.Should().Be(true);
        }
    }
}
Was it helpful?

Solution

That's because v3.0 requires 4.0.3 of the .NET framework (which most people are already using).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top