为什么“.deps.json"发布文件夹上的文件和发布输出文件夹大小不同 [英] Why the ".deps.json" file on release folder and publish output folder size are difference

查看:26
本文介绍了为什么“.deps.json"发布文件夹上的文件和发布输出文件夹大小不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我基于项目构建并检查发布文件夹大小为 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"

在 .net 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"发布文件夹上的文件和发布输出文件夹大小不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆