-
Notifications
You must be signed in to change notification settings - Fork 416
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
.Net 4.7 doesnt require the package System.ValueTuple #348
Comments
See #280. This was resolved in version 2.7. |
@atifaziz Just tested it with a new Project and I end up with that: So, I dont see that it was solved. |
@Rand-Random MoreLINQ depends on System.ValueTuple 4.4.0 and that dependency then does the right thing for .NET 4.7. I'd encourage you to read through the discussion in #280 for more background. |
@atifaziz Sorry, but its more like you need to read it once more. The problem was the combination .Net 4.7 and the NuGet Package System.ValueTuple inside a single project. Both of them just simply cannot work together and you would result in having the same classes twice. Microsoft updated the NuGet Package so that it will redirect to use the mscorlib if System.ValueTuple AND .Net 4.7 are both in use, rendering the NuGet Package System.ValueTuple useless. You simply dont need the NuGet Package System.ValueTuple in .Net 4.7. And so, no you arent doing the right thing for .Net 4.7, the right thing to do is target 4.7 and remove the dependency. |
@Rand-Random Correct but as I said in the following comment in #280:
MoreLINQ doesn't have an explicit target for 4.7 so our only way to solve the issue is to exploit, as you put it, the kind favour from Microsoft. Let me ask you, how is this bothering you today? In #280, the issue was compilation errors for people. If you're having the same issue then this is a duplicate but I don't think that's your case. If this is a kind reminder that the dependency should be removed the day we decide to add .NET 4.7 as an explicit target, then thanks (and sorry to discard this issue as a duplicate of #280); and so I'm re-opening the issue on that basis. If you think there's another way to resolve this earlier then I'm listening. |
Its bothering me that it adds a NuGet Package thats useless. I am not familar with deploying a NuGet Package, but cant you "just" simply state what the dependencies are? How did you remove the dependency for .Net Standard 2.0 ? |
A quick Google search (again I have no knowledge in that topic) Have a look at: The part about "Dependency groups", where you can state:
So maybe you can just simply say:
And just to make clear I am not asking to change your Target Framwork of your Projects to .Net 4.7, when I previously talked about "target" I meant that the NuGet package should "target" the .Net 4.7 to state "I dont need dependency when I get installed on a .Net 4.7 project". |
I don't think that will work. If you target the package to support .NET 4.7 but don't provide a specific build of |
@Rand-Random .NET Framework 4.0 was released some 7 years ago. .NET Framework 4.7 is an in-place replacement and released just months ago. You cannot install the two side-by-side so requiring .NET 4.7 raises the bar for anyone wanting to work on the project to have it installed (I'm not aware of a way to target later versions with targeting packs alone). I for one don't have .NET 4.7 so that's already going to be problematic. .NET Core 1.0 and 2.0 are lesser of an issue as they can be installed side-by-side and a lot more self-contained. You also have to keep in mind that we support building on non-Windows platforms so we have to also keep what all works with Mono. |
After changing the following lines in MoreLinq.csproj To: and
To:
Notice the missing, NuGet package "System.ValueTuple" in .NETFramework 4.7. |
Can you provide this? Or do I have to manage a copy of morelinq myself with the mentioned changes? |
@Rand-Random It's very simple. You have .NET Framework 4.7 installed so you are able to target it for MoreLINQ. I don't so I cannot. If the extra pull of System.ValueTuple 4.4.0 is unbearable for you then I'm afraid that the quick answer is that you'll have to manage a copy/clone yourself until a time it can be addressed here. If you want to help, here's what it'll take:
|
I think this is the key feature. Currently the build is for all targets. It can be desirable to be able to build a single target (and have travis/appveyor build the nuget packages for each target). |
@fsateler Right and I don't have the cycles right now to investigate how to make that optional across the various environments (perhaps it's not complicated but it never is on the outset 😏) and it seems like no one who participated in the discussion in #280 has a distaste for seeing a System.ValueTuple dependency. Of course, help is welcome from anyone with knowledge and time to spare. |
@atifaziz Neither do I, and I don't have much interest either. The ValueTuple dependency does not bother me at all. |
hi guys, did you get this working? I read also #280 comments, but seems like my compilation is still failing. Targeting 4.7.1 and getting this duplicate import errors.. |
@valdisiljuconoks Are you using MoreLINQ 2.7 or later? |
I'm on 2.8 |
@valdisiljuconoks I don't have .NET Framework 4.7.1 to verify your case quickly. It would help if you can prepare a repo with a very simple console app demonstrating your build problem in a container and share it here. This is also the wrong issue to be tracking this on so please open another. Do keep in mind also that this is not a fundamental problem with MoreLINQ so you might get more help or eyes on the problem if you report in repos related to .NET Core. |
We now have a |
A .NET 4.7.2 project will reference the .NET Framework build in a NuGet package if it's available in preference over any .NET Standard library. So even if MoreLINQ includes a See the discussion in the comments at https://stackoverflow.com/questions/53407579/prefer-net-standard-2-0-library-reference-over-net-4-5-1-from-a-net-4-7-2-pro |
@igitur That's correct but that See my earlier comment on why we don't have a .NET 4.7 target specifically to address this issue. |
So this isn't true anymore. .NET 4.7.2 is now very ubiquitous. I don't see a reason for not providing a net472 build. |
Even though .Net 4.7 doesnt require the package System.ValueTuple and my projects are in .Net 4.7, morelinq requires the System.ValueTuple NuGet package.
The text was updated successfully, but these errors were encountered: