为什么要使用".deps.json"发布文件夹上的文件和发布输出文件夹的大小是不同的

编程入门 行业动态 更新时间:2024-10-26 06:27:11
本文介绍了为什么要使用".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"

在 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"发布文件夹上的文件和发布输出文件夹的大小是不同的

本文发布于:2023-11-13 10:19:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584118.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   要使   大小   文件   json

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!