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

NuGet package adds many unnecessary dependencies on .NET Core #56

Closed
Brice-xCIT opened this issue Sep 24, 2019 · 4 comments
Closed

NuGet package adds many unnecessary dependencies on .NET Core #56

Brice-xCIT opened this issue Sep 24, 2019 · 4 comments
Milestone

Comments

@Brice-xCIT
Copy link

Brice-xCIT commented Sep 24, 2019

Hi, I'm using the 1.6.0 version of this lib from NuGet, in a netcore22 app. On this platform the NuGet package adds a dependency to System.Diagnostics.Process 4.3.0, which in turns adds many netfx dependencies. That seem a bit unnecessary to me, since Process and its dependencies are already in the core framework. The extra DLLs about quadrupled the size of my final package.
Is the dependency to System.Diagnostics.Process 4.3.0 necessary?

@madelson
Copy link
Owner

@Brice-xCIT please double-check me, but I don't think that System.Diagnostics.Process gets pulled in by default for a netstandard build (I don't see it under https://www.nuget.org/packages/NETStandard.Library/). If that's true, then we do need this for a .NET standard build, which is what .NET core leverages currently.

If this is available by default in netcoreapp, then perhaps we could add another build for netcoreapp20 or something that has no dependencies (like what we have for .NET framework).

Thoughts?

@Brice-xCIT
Copy link
Author

Hi @madelson, first of all sorry, I realized my diagnosis was wrong, the file size has not tremendously increased- something else was the culprit.
This said, if I create a .NET Core app (or class library) project in VS, System.Diagnostics.Process.dll is included in the default sdk https://www.nuget.org/packages/Microsoft.NETCore.App. Funnily enough, the Process class and model are also in .NET Standard 2.0. Are you maybe using additional facilities provided by the NuGet package?

@madelson
Copy link
Owner

@Brice-xCIT ok I think I understand the situation now. System.Diagnostics.Process was not included in .NET Standard 1.3 but IS included in .NET Standard 2.0. I've been specifying it as a dependency for both targets, but it looks like I can safely remove it from 2.0. I'll release a new version with the slimmer set of dependencies.

Thanks for reporting!

@madelson madelson added this to the 1.6.1 milestone Sep 26, 2019
@madelson
Copy link
Owner

FYI a prerelease of 1.6.1 is available that has the slimmer dependency set.

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

No branches or pull requests

2 participants