2016-03-09 7 views
5

Podczas instalowania zespołów pobierania plików NuGet, takich jak System.Runtime, mimo że już miałem ten zestaw zainstalowany z .NET 4.6.1.Dlaczego NuGet pobiera pozornie niepotrzebne zależności?

Ponadto, katalogi pod lib (jak pakiety \ System.Runtime.4.0.0 \ lib \ net45) nie zawierają dll, tylko puste pliki zwane _._.

Dlaczego tak się dzieje? Dlaczego jest to konieczne? Czego tu mi brakuje?

Nuget dziennika:

Install-Package System.Collections.Immutable -Version 1.1.37 
Attempting to gather dependency information for package 'System.Collections.Immutable.1.1.37' with respect to project 'ConsoleApplication1', targeting '.NETFramework,Version=v4.6.1' 
Attempting to resolve dependencies for package 'System.Collections.Immutable.1.1.37' with DependencyBehavior 'Lowest' 
Resolving actions to install package 'System.Collections.Immutable.1.1.37' 
Resolved actions to install package 'System.Collections.Immutable.1.1.37' 
    GET https://www.nuget.org/api/v2/package/System.Collections/4.0.0 
Installing System.Collections 4.0.0. 
Adding package 'System.Collections.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Collections.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Collections.4.0.0' to 'packages.config' 
Successfully installed 'System.Collections 4.0.0' to ConsoleApplication1 
    GET https://www.nuget.org/api/v2/package/System.Diagnostics.Debug/4.0.0 
Installing System.Diagnostics.Debug 4.0.0. 
Adding package 'System.Diagnostics.Debug.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Diagnostics.Debug.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Diagnostics.Debug.4.0.0' to 'packages.config' 
Successfully installed 'System.Diagnostics.Debug 4.0.0' to ConsoleApplication1 
    GET https://www.nuget.org/api/v2/package/System.Globalization/4.0.0 
Installing System.Globalization 4.0.0. 
Adding package 'System.Globalization.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Globalization.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Globalization.4.0.0' to 'packages.config' 
Successfully installed 'System.Globalization 4.0.0' to ConsoleApplication1 
    GET https://www.nuget.org/api/v2/package/System.Linq/4.0.0 
Installing System.Linq 4.0.0. 
Adding package 'System.Linq.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Linq.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Linq.4.0.0' to 'packages.config' 
Successfully installed 'System.Linq 4.0.0' to ConsoleApplication1 
    GET https://www.nuget.org/api/v2/package/System.Resources.ResourceManager/4.0.0 
Installing System.Resources.ResourceManager 4.0.0. 
Adding package 'System.Resources.ResourceManager.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Resources.ResourceManager.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Resources.ResourceManager.4.0.0' to 'packages.config' 
Successfully installed 'System.Resources.ResourceManager 4.0.0' to ConsoleApplication1 
    GET https://www.nuget.org/api/v2/package/System.Runtime/4.0.0 
Installing System.Runtime 4.0.0. 
Adding package 'System.Runtime.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Runtime.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Runtime.4.0.0' to 'packages.config' 
Successfully installed 'System.Runtime 4.0.0' to ConsoleApplication1 
    GET https://www.nuget.org/api/v2/package/System.Runtime.Extensions/4.0.0 
Installing System.Runtime.Extensions 4.0.0. 
Adding package 'System.Runtime.Extensions.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Runtime.Extensions.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Runtime.Extensions.4.0.0' to 'packages.config' 
Successfully installed 'System.Runtime.Extensions 4.0.0' to ConsoleApplication1 
    GET https://www.nuget.org/api/v2/package/System.Threading/4.0.0 
Installing System.Threading 4.0.0. 
Adding package 'System.Threading.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Threading.4.0.0' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Threading.4.0.0' to 'packages.config' 
Successfully installed 'System.Threading 4.0.0' to ConsoleApplication1 
    GET https://www.nuget.org/api/v2/package/System.Collections.Immutable/1.1.37 
Installing System.Collections.Immutable 1.1.37. 
Adding package 'System.Collections.Immutable.1.1.37' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Collections.Immutable.1.1.37' to folder 'd:\workspace\ConsoleApplication1\packages' 
Added package 'System.Collections.Immutable.1.1.37' to 'packages.config' 
Successfully installed 'System.Collections.Immutable 1.1.37' to ConsoleApplication1 

Odpowiedz

1

myślę to z powodu zmian, które nadchodzą z rdzeniem DotNet/CLI. Utrzymuje łańcuch zależności, który jest znacznie ważniejszy w rdzeniu donet, ponieważ nie masz w pełni zainstalowanego środowiska. To wyjaśnia, dlaczego foldery lib\net45 są puste, nie ma rzeczy do uwzględnienia, ponieważ są one częścią BCL zainstalowanego na twoim komputerze.