Skip to content

Unnecessary dlls copied to output folder #2227

@jaredpar

Description

@jaredpar

Consider the following solution where all projects use the new SDK (VS 15.6.7):

  • Util: a DLL project targeting netstandard1.3
  • MyApp: an EXE project targeting net46 and referencing Util

This projects have no other than the project template (hello world). I would expect building such a solution would put the minimum set of DLLs into the output folder of MyApp. Yet when I build I get the following set:

  • Microsoft.Win32.Primitives.dll
  • System.AppContext.dll
  • System.Console.dll
  • System.Diagnostics.DiagnosticSource.dll
  • System.Globalization.Calendars.dll
  • System.IO.Compression.dll
  • System.IO.Compression.ZipFile.dll
  • System.IO.FileSystem.dll
  • System.IO.FileSystem.Primitives.dll
  • System.Net.Http.dll
  • System.Net.Sockets.dll
  • System.Runtime.InteropServices.RuntimeInformation.dll
  • System.Security.Cryptography.Algorithms.dll
  • System.Security.Cryptography.Encoding.dll
  • System.Security.Cryptography.Primitives.dll
  • System.Security.Cryptography.X509Certificates.dll
  • System.Xml.ReaderWriter.dll

Almost none of these are necessary to run my application yet they are included in my project output. How am I supposed to know what DLLs are and aren't necessary for execution? This is important because I need to construct a minimal NuGet package.

Adding System.Net.Http to a "hello world" app is fairly suspicious.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions