Replies: 1 comment 2 replies
-
This is fixed in C# 7.3 with Improved overload candidates. In a previous version of this issue, you specified that for compatibility reasons you cannot upgrade your project from C# 7.1. A workaround for C# 7.1 is to use "static using" to help overload resolution to disambiguate the using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using static FluentAssertions.AssertionExtensions;
namespace TestProject6
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var compareResults = new List<int>() { 42 };
compareResults.Should().HaveCount(1);
}
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Migrating a unit test project from 5.10.3 to 6.10.0
All changes were applied but a missing one:
Also running this on our pipeline with vsnet 2017.
Reproduction Steps
Any instruction with Should gives error when compiling:
Expected behavior
No compilation errors.
Actual behavior
All instructions gives the error:
Regression?
No response
Known Workarounds
Configuration
Other information
No response
Beta Was this translation helpful? Give feedback.
All reactions