NuGetForUnity: Nuget for Unity installs too many packages
Description
Nuget for Unity installs too many packages. Aside from the package I want to install, it also installs packages from the System namespace (like System.IO, System.Linq, System.Collections, etc.), which should not be installed, because obviously those DLLs are already present.
Because of the installation of those additional DLLs, Unity complains about “Multiple assemblies with equivalent identity”.
The full content of the packages.config file after I installed only the one package mentioned below:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="4.4.0" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" />
<package id="Microsoft.NETCore.Targets" version="1.1.0" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" />
<package id="Moq" version="4.15.1" />
<package id="NETStandard.Library" version="1.6.1" />
<package id="runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.native.System" version="4.3.0" />
<package id="runtime.native.System.IO.Compression" version="4.3.0" />
<package id="runtime.native.System.Net.Http" version="4.3.0" />
<package id="runtime.native.System.Security.Cryptography.Apple" version="4.3.0" />
<package id="runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple" version="4.3.0" />
<package id="runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="System.AppContext" version="4.3.0" />
<package id="System.Buffers" version="4.3.0" />
<package id="System.Collections" version="4.3.0" />
<package id="System.Collections.Concurrent" version="4.3.0" />
<package id="System.Collections.NonGeneric" version="4.3.0" />
<package id="System.Collections.Specialized" version="4.3.0" />
<package id="System.ComponentModel" version="4.3.0" />
<package id="System.ComponentModel.Primitives" version="4.3.0" />
<package id="System.ComponentModel.TypeConverter" version="4.3.0" />
<package id="System.Console" version="4.3.0" />
<package id="System.Diagnostics.Debug" version="4.3.0" />
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" />
<package id="System.Diagnostics.Tools" version="4.3.0" />
<package id="System.Diagnostics.TraceSource" version="4.3.0" />
<package id="System.Diagnostics.Tracing" version="4.3.0" />
<package id="System.Dynamic.Runtime" version="4.3.0" />
<package id="System.Globalization" version="4.3.0" />
<package id="System.Globalization.Calendars" version="4.3.0" />
<package id="System.Globalization.Extensions" version="4.3.0" />
<package id="System.IO" version="4.3.0" />
<package id="System.IO.Compression" version="4.3.0" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" />
<package id="System.IO.FileSystem" version="4.3.0" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" />
<package id="System.Linq" version="4.3.0" />
<package id="System.Linq.Expressions" version="4.3.0" />
<package id="System.Net.Http" version="4.3.0" />
<package id="System.Net.Primitives" version="4.3.0" />
<package id="System.Net.Sockets" version="4.3.0" />
<package id="System.ObjectModel" version="4.3.0" />
<package id="System.Reflection" version="4.3.0" />
<package id="System.Reflection.Emit" version="4.3.0" />
<package id="System.Reflection.Emit.ILGeneration" version="4.3.0" />
<package id="System.Reflection.Emit.Lightweight" version="4.3.0" />
<package id="System.Reflection.Extensions" version="4.3.0" />
<package id="System.Reflection.Primitives" version="4.3.0" />
<package id="System.Reflection.TypeExtensions" version="4.3.0" />
<package id="System.Resources.ResourceManager" version="4.3.0" />
<package id="System.Runtime" version="4.3.0" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.0" />
<package id="System.Runtime.Extensions" version="4.3.0" />
<package id="System.Runtime.Handles" version="4.3.0" />
<package id="System.Runtime.InteropServices" version="4.3.0" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" />
<package id="System.Runtime.Numerics" version="4.3.0" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" />
<package id="System.Security.Cryptography.Cng" version="4.3.0" />
<package id="System.Security.Cryptography.Csp" version="4.3.0" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" />
<package id="System.Security.Cryptography.OpenSsl" version="4.3.0" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" />
<package id="System.Text.Encoding" version="4.3.0" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" />
<package id="System.Text.RegularExpressions" version="4.3.0" />
<package id="System.Threading" version="4.3.0" />
<package id="System.Threading.Tasks" version="4.3.0" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" />
<package id="System.Threading.Timer" version="4.3.0" />
<package id="System.Xml.ReaderWriter" version="4.3.0" />
<package id="System.Xml.XDocument" version="4.3.0" />
<package id="System.Xml.XmlDocument" version="4.3.0" />
</packages>
- NuGet Package: Moq, 4.15.1
- NuGetForUnity Version: 2.0.0
- Unity Version: 2020.1.6f1
- Operating System: Win 10, 64 bit
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (8 by maintainers)
Commits related to this issue
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to KonH/NuGetForUnity by KonH 6 years ago
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to opuscope/NuGetForUnity by KonH 6 years ago
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to opuscope/NuGetForUnity by KonH 6 years ago
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to ligurion/GITenberg5 by ligurion in 5 years
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to q5258gj/vigilant by q5258gj in 5 years
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to kjiayuu/nLightn by kjiayuu in 5 years
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to 136854793m/go-kratos by 136854793m in 5 years
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to SaurabViena/skni-kod by SaurabViena in 8 years
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to Vlongenko/Jonatha by Vlongenko in 7 years
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to HannesBaldursson/CC by HannesBaldursson in 8 years
- Do not use already imported in engine libraries while cleaning up Refers to https://github.com/GlitchEnzo/NuGetForUnity/issues/354 — committed to AnliC24sh/Harmonization by AnliC24sh in 8 years
Yeah, I will try to make PR for that in next few days.
At this line you can see where we’re deleting subfolders of the Nuget “lib” folder based on the “best” target framework for the given settings. Around this point in the code I think we should:
Does that make sense?
I believe we can use EditorApplication.applicationPath to get the path to the currently running Unity executable.