我建立在项目上,并检查发行文件夹的大小为"280KB" 但是当我尝试发布输出文件时,文件大小为"296KB"
I build on project and checked on release folder size is "280KB" but when I try on publish output file size is "296KB"
在 core 2.0和VS 2017上进行了测试
推荐答案
bin/[Configuration]中的输出仅用于本地开发.该文件与runtimeconfig.dev.json一起指定生成输出的依赖项关闭,并从本地NuGet包缓存中解析引用.如果将构建输出复制到另一台计算机/用户,它将无法正常工作.
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.
对于部署,将所有需要的DLL复制到构建输出,并使用稍有不同的输入来生成deps.json文件,以描述已发布应用程序的依赖关系关闭.
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.
此发布输出是通过Visual Studio发布输出或通过使用
This publish output is generated by either Visual Studio publish output or by using
dotnet publish -c Release在控制台中.
更多推荐
为什么要使用".deps.json"发布文件夹上的文件和发布输出文件夹的大小是不同的
发布评论