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

Investigate: 122 dependencies in Newtonsoft.Json 10.0.2 when adding to UWP app #1291

Closed
martinsuchan opened this Issue Apr 23, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@martinsuchan
Copy link

martinsuchan commented Apr 23, 2017

When adding previous version 9.0.1 to UWP app, it added only one required dll and that was all, working as expected.

Suddenly when I updated to v10.0.2, this package has transitive dependency on 122(!) other NuGet packages, that are part of the NETStandard.Library and Microsoft.CSharp. The full list of dependencies is at the bottom.

I don't really think Newtonsoft.Json should require this huge list of dependencies when targeting the UWP platform, specifically Microsoft.NETCore.UniversalWindowsPlatform 5.3.2.

122 dependencies in Newtonsoft.Json 10.0.2

Microsoft.CSharp 4.3.0
Microsoft.NETCore.Platforms 1.1.0
Microsoft.NETCore.Targets 1.1.0
Microsoft.Win32.Primitives 4.3.0
NETStandard.Library 1.6.1
runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.native.System.IO.Compression 4.3.0
runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0
System.AppContext 4.3.0
System.Buffers 4.3.0
System.Collections 4.3.0
System.Collections.Concurrent 4.3.0
System.ComponentModel.Primitives 4.3.0
System.ComponentModel.TypeConverter 4.3.0
System.Console 4.3.0
System.Diagnostics.Contracts 4.3.0
System.Diagnostics.Debug 4.3.0
System.Diagnostics.DiagnosticSource 4.3.0
System.Diagnostics.Tools 4.3.0
System.Diagnostics.Tracing 4.3.0
System.Dynamic.Runtime 4.3.0
System.Globalization 4.3.0
System.Globalization.Calendars 4.3.0
System.IO 4.3.0
System.IO.Compression 4.3.0
System.IO.Compression.ZipFile 4.3.0
System.IO.FileSystem 4.3.0
System.IO.FileSystem.Primitives 4.3.0
System.Linq 4.3.0
System.Linq.Expressions 4.3.0
System.Net.Http 4.3.0
System.Net.Primitives 4.3.0
System.Net.Sockets 4.3.0
System.ObjectModel 4.3.0
System.Reflection 4.3.0
System.Reflection.Emit.ILGeneration 4.3.0
System.Reflection.Emit.Lightweight 4.3.0
System.Reflection.Extensions 4.3.0
System.Reflection.Primitives 4.3.0
System.Reflection.TypeExtensions 4.3.0
System.Resources.ResourceManager 4.3.0
System.Runtime 4.3.0
System.Runtime.Extensions 4.3.0
System.Runtime.Handles 4.3.0
System.Runtime.InteropServices 4.3.0
System.Runtime.InteropServices.RuntimeInformation 4.3.0
System.Runtime.Numerics 4.3.0
System.Runtime.Serialization.Formatters 4.3.0
System.Runtime.Serialization.Primitives 4.3.0
System.Runtime.WindowsRuntime 4.3.0
System.Security.Cryptography.Algorithms 4.3.0
System.Security.Cryptography.Cng 4.3.0
System.Security.Cryptography.Encoding 4.3.0
System.Security.Cryptography.Primitives 4.3.0
System.Security.Cryptography.X509Certificates 4.3.0
System.Text.Encoding 4.3.0
System.Text.Encoding.Extensions 4.3.0
System.Text.RegularExpressions 4.3.0
System.Threading 4.3.0
System.Threading.Tasks 4.3.0
System.Threading.Tasks.Extensions 4.3.0
System.Threading.Timer 4.3.0
System.Xml.ReaderWriter 4.3.0
System.Xml.XDocument 4.3.0
System.Xml.XmlDocument 4.3.0
runtime.any.System.Collections 4.3.0
runtime.any.System.Diagnostics.Tools 4.3.0
runtime.any.System.Diagnostics.Tracing 4.3.0
runtime.any.System.Globalization 4.3.0
runtime.any.System.Globalization.Calendars 4.3.0
runtime.any.System.IO 4.3.0
runtime.any.System.Reflection 4.3.0
runtime.any.System.Reflection.Extensions 4.3.0
runtime.any.System.Reflection.Primitives 4.3.0
runtime.any.System.Resources.ResourceManager 4.3.0
runtime.any.System.Runtime 4.3.0
runtime.any.System.Runtime.Handles 4.3.0
runtime.any.System.Runtime.InteropServices 4.3.0
runtime.any.System.Text.Encoding 4.3.0
runtime.any.System.Text.Encoding.Extensions 4.3.0
runtime.any.System.Threading.Tasks 4.3.0
runtime.any.System.Threading.Timer 4.3.0
runtime.win.Microsoft.Win32.Primitives 4.3.0
runtime.win.System.Console 4.3.0
runtime.win.System.Diagnostics.Debug 4.3.0
runtime.win.System.IO.FileSystem 4.3.0
runtime.win.System.Net.Primitives 4.3.0
runtime.win.System.Net.Sockets 4.3.0
runtime.win.System.Runtime.Extensions 4.3.0
runtime.win7.System.Private.Uri 4.3.0
runtime.win8-arm.runtime.native.System.IO.Compression 4.3.0
System.Net.NameResolution 4.3.0
System.Private.Uri 4.3.0
System.Threading.Overlapped 4.3.0
runtime.aot.System.Collections 4.3.0
runtime.aot.System.Diagnostics.Tools 4.3.0
runtime.aot.System.Diagnostics.Tracing 4.3.0
runtime.aot.System.Globalization 4.3.0
runtime.aot.System.Globalization.Calendars 4.3.0
runtime.aot.System.IO 4.3.0
runtime.aot.System.Reflection 4.3.0
runtime.aot.System.Reflection.Extensions 4.3.0
runtime.aot.System.Reflection.Primitives 4.3.0
runtime.aot.System.Resources.ResourceManager 4.3.0
runtime.aot.System.Runtime 4.3.0
runtime.aot.System.Runtime.Handles 4.3.0
runtime.aot.System.Runtime.InteropServices 4.3.0
runtime.aot.System.Text.Encoding 4.3.0
runtime.aot.System.Text.Encoding.Extensions 4.3.0
runtime.aot.System.Threading.Tasks 4.3.0
runtime.aot.System.Threading.Timer 4.3.0
runtime.win7-x64.runtime.native.System.IO.Compression 4.3.0
runtime.win7-x86.runtime.native.System.IO.Compression 4.3.0

@JamesNK

This comment has been minimized.

Copy link
Owner

JamesNK commented Apr 23, 2017

I believe it is because Json.NET is referencing .NET Core 1.1 libs (NETStandard.Library 1.6.1) and UWP is still 1.0. The 1.0 libs are being replaced with 1.1 libs from NuGet

Either use 9.0.1 until UWP moves to .NET Core 1.1 and those NuGet packages are bundled by default or just accept that there are a lot of NuGet packages. As soon as you reference another package that uses NETStandard.Library 1.6.1 then the same thing will happen.

I'm not a UWP expert. IMO you should raise this with MS if lots of NuGet packages concern you.

@martinsuchan

This comment has been minimized.

Copy link
Author

martinsuchan commented Apr 23, 2017

I should maybe rephrase the issue to: Do not force .NET Core libs 1.1 in UWP projects
Edit, based on this blogpost:

Is the native builder included in this released?
Great question. .NET Native support isn’t yet included. That’s something that is likely to show up in 2017.

So it's possible that installing Newtonsoft.Json v10.0.2 can break the .NET Native compilation in UWP apps?

@JamesNK

This comment has been minimized.

Copy link
Owner

JamesNK commented Apr 23, 2017

No idea. If it does then that is a bug for the UWP team.

@JamesNK

This comment has been minimized.

Copy link
Owner

JamesNK commented Jan 1, 2018

Newtonsoft.Json supports .NET Standard 2 now. You should be able to use that with new versions of UWP without a lot of references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment