Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueTuple Package not necessary for .Net 4.7 #578

Closed
bdarby22 opened this issue Jan 19, 2018 · 11 comments · Fixed by #591
Closed

ValueTuple Package not necessary for .Net 4.7 #578

bdarby22 opened this issue Jan 19, 2018 · 11 comments · Fixed by #591
Milestone

Comments

@bdarby22
Copy link

bdarby22 commented Jan 19, 2018

As of .Net 4.7, the ValueTuple is provided in the framework and the separate package reference is not necessary. Its inclusion conflicts with the system library.

e.g. mock.Setup(e => e.DoStuff(It.IsAny<(int MyInt, DateTime MyDateTime) >())).Verifiable();

This would not compile until I forcibly removed the ValueTuple package reference from my project.

@stakx
Copy link
Contributor

stakx commented Jan 19, 2018

Hi @bdarby22. Thanks for reporting this. If that is correct, we'd have to add a separate framework target for net47 (or perhaps just netstandard20).

I do wonder, though: Wouldn't it make even more sense for the .NET team to change the System.ValueTuple NuGet package so it is basically empty for net47? First everyone's forced to use the NuGet package because the language feature relies on it, next we're forced to multi-target our projects because of the conflict you describe. .NET development has become a crazy mess lately. 😢

@stakx
Copy link
Contributor

stakx commented Jan 21, 2018

Wouldn't it make even more sense for the .NET team to change the System.ValueTuple NuGet package so it is basically empty for net47?

According to https://github.com/dotnet/corefx/issues/23085, this has already happened. But after the ordeal of #566 and #567, I am very reluctant to potentially repeat the same mistake by upgrading System.ValueTuple from 4.3.0 to 4.4.0, given the latter version's targeted frameworks. Adding an additional net47 framework target seems a safer choice at this point.

@kherr9
Copy link

kherr9 commented Jan 23, 2018

Can use moq 4.8.0, which doesn't have System.ValueTuple dep.
Currently moq 4.8.1 is latest.

@steelerc
Copy link

I'm still seeing a dep on System.ValueTuple 4.3.0 when installing Moq 4.8.1

@kherr9
Copy link

kherr9 commented Jan 31, 2018

@steelerc Use 4.8.0

@stakx
Copy link
Contributor

stakx commented Feb 2, 2018

@steelerc:

I'm still seeing a dep on System.ValueTuple 4.3.0 when installing Moq 4.8.1

Once released, a particular version never get changed. 4.8.1 will always have that particular issue.

Expect a fix for 4.8.2 in about 3 or 4 weeks' time. Until then use 4.8.0 like suggested above. ;-)

@huysentruitw
Copy link

huysentruitw commented Feb 12, 2018

Eagerly waiting for 4.8.2 because of this as 4.8.0 depends on System.Threading.Tasks.Extensions 4.4.0 which generates its own issues https://stackoverflow.com/questions/48060230/system-reference-troubles-when-introducing-netstandard-library-dependency#comment83123889_48060230

@stakx
Copy link
Contributor

stakx commented Feb 12, 2018

I'll try to resolve this during the weekend ahead.

@stakx
Copy link
Contributor

stakx commented Feb 23, 2018

Moq 4.8.2 (see changelog) has just been published on NuGet.

Please report if there's any more trouble with ValueTuple and .NET 4.7+.

@stakx stakx added this to the 4.10.1 milestone Nov 9, 2018
@stakx
Copy link
Contributor

stakx commented Dec 3, 2018

@bdarby22 - Moq 4.10.1 has just become available on Moq. That version no longer has a dependency on System.ValueTuple.

@huysentruitw
Copy link

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants