问题
I build on project and checked on release folder size is "280KB" but when I try on publish output file size is "296KB"
Tested on .net core 2.0 and VS 2017
回答1:
The output in bin/[Configuration] is only meant to be used for local development. Together with the runtimeconfig.dev.json this file specifies the dependency closure of your build output and references are resolved from your local NuGet package cache. If you copy the build output to another machine/user, it will not work.
For deployment, all needed DLLs are copied to the build output and a deps.json file is generated using a slightly different input to describe the dependency closure of the published application.
This publish output is generated by either Visual Studio publish output or by using
dotnet publish -c Release
in the console.
来源:https://stackoverflow.com/questions/49917841/why-the-deps-json-file-on-release-folder-and-publish-output-folder-size-are-d