For a long time, we used the Microsoft Fakes framework in our solution to fake System.DateTime.UtcNow during testing.
More recently, although a few weeks ago we started using C # 7 functions (since VS 2017), including tuples as return values ββfrom functions. Now I have created a new branch for release. In the new branch, fake generation fails with a few posts below
4>C:\Users\...\Source\... 2017\DEV\WebApp.UnitTests\f.cs(116674,53): error CS0234: The type or namespace name 'ITuple' does not exist in the namespace 'System.Runtime.CompilerServices' (are you missing an assembly reference?) [C:\Users\...\Source\... 2017\DEV\WebApp.UnitTests\obj\Debug\Fakes\m\f.csproj]
4>C:\Users\...\Source\... 2017\DEV\WebApp.UnitTests\f.cs(116674,13): error CS0538: 'ITuple' in explicit interface declaration is not an interface [C:\Users\...\Source\... 2017\DEV\WebApp.UnitTests\obj\Debug\Fakes\m\f.csproj]
I tried this:
- Add Microsoft.Net.Compilers 2.4.0 NuGet for all projects
- Update all projects to configure .NET 4.7 (from 4.6.1) and remove all System.ValueTuple links (as they are now built into .NET 4.7)
, . , System.ValueTuple NuGet. . , FakesAssemblies, NuGet -.
, , .
EDIT: , Fakes . .