Skip to content

Restoring a "dotnet new - Hello World" console app downloads 340 MBs of NuGet packages #16549

Closed
@eerhardt

Description

@eerhardt

To repro on a new machine (or delete your %userprofile%\.nuget\packages folder):

Expected Results

In all actuality, I expected the same .NET assemblies that I installed when I installed the dotnet cli to be used.

Actual Results

dotnet restore takes a while, and when it is finished my %userprofile%\.nuget\packages folder is 340 MB on disk.

Looking into this, a lot of the NuGet packages we download have xml files for every supported language, for multiple versions, and for multiple TFMs. For example:

System.Runtime.Extensions
|--- / 4.0.10
        |--- /ref
                |--- /dotnet
                        |--- /de
                                |--- /System.Runtime.Extensions.xml     325 KB
                        |--- /es
                        |--- /.. 7 other languages
                |--- /MonoAndroid10
                |--- /... 4 other TFMs
|--- / 4.1.0-rc2-23811
        |--- /ref
                |--- /dotnet5.1
                        |--- /de
                                |--- /System.Runtime.Extensions.xml     325 KB
                        |--- /es
                        |--- /.. 7 other languages
                |--- /... 11 other TFMs

System.Runtime.Extensions alone is 14.2 MB

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions