R
R
RockmanLeto2018-08-21 02:10:24
.NET
RockmanLeto, 2018-08-21 02:10:24

How to publish a .NET Core application with only the required set of libraries?

I am publishing a .net core application under linux, say under Ubuntu. In addition to the program itself, the publish folder contains a bunch of necessary DLLs. Many of them correspond to existing namespaces in .net core, but more than half of them are not used in the program. So the question is, is it possible to publish an application so that the source directory contains only the necessary ones to reduce its final size and reduce the number of files?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman, 2018-08-21
@yarosroman

What is not used by you does not mean that it is not used by the linked libraries. When publishing, the extra is definitely not added.

E
Eugene, 2018-08-21
@evgshk

In your references, either a link to the NetCoreApp package, or to some Net Standard (compatibility package).
Each of them can pull a sheet of dll-ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question