'ASP Web API Large Runtimes Folder
I have 2 projects, an ASP MVC project and an ASP Web API project using .NET Framework 4.7.2
From a coding perspective both of these project types are very similar.
Yet the MVC project publishes to <100MB and the API project to 500MB+, despite the MVC project containing numerous JS libraries and other content.
This seems to be down to a folder the Web API project includes called "runtimes". Is this folder necessary, can it be optionalised, are there some optimisation options I can set?
Solution 1:[1]
This is the framework which is published because of the settings in your publish profile.
Publishing your app as self-contained produces an application that includes the .NET runtime and libraries, and your application and its dependencies. Users of the application can run it on a machine that doesn't have the .NET runtime installed. Publishing your app as framework-dependent produces an application that includes only your application itself and its dependencies. Users of the application have to separately install the .NET runtime.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | sommmen |
