为什么我的bin发行目录中存在System.*.* dll? [英] Why are there System.*.* dlls in my bin release directory?

查看:73
本文介绍了为什么我的bin发行目录中存在System.*.* dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建包含10行代码并依赖Zeroconf&的应用程序时Newtonsoft.json,它在我的bin版本的Directoy中产生了大约104个dll,其中很多是System.. dll.

When building my application which consists of 10 lines of code and has dependency to Zeroconf & Newtonsoft.json, it produces around 104 dlls in my bin release directoy and a lot of them are System.. dlls.

为什么?如何将其减少到3个dll?一个用于我的库,一个用于zeroconf,一个用于Newtonsoft.Json.

Why? How can I reduce it to 3 dlls? one for my lib, one for zeroconf and one for Newtonsoft.Json.

nuget 安装.Net 4.7.1之后

推荐答案

这是.net标准2.0/net 4.6/4.7.1问题,在4.7.2中得到了改进:

This is a .net standard 2.0/net 4.6/4.7.1 issue which was improved in 4.7.2:

在.NET Framework 4.7.2中,我们解决了已知的运行时问题 .NET Standard 2.0.我们对运行时进行了更改,以确保 您不需要与.NET Standard库一起部署其他文件"

"In .NET Framework 4.7.2 we have addresses the known runtime issues with .NET Standard 2.0. We made changes to the runtime to ensure that you don’t need additional files deployed along with your .NET Standard library"

因此,运行Visual Studio 2017安装程序并安装.Net Framework 4.7.2和目标包,并将您的应用程序定位为.net 4.7.2.

So, run Visual Studio 2017 Installer and install .Net Framework 4.7.2 and the Target Pack and target your app as .net 4.7.2.

这篇关于为什么我的bin发行目录中存在System.*.* dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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