[英].NET multi target frameworks copies System.* DLLs to .NET Framework output directory
I've got a .NET project that targets multiple frameworks, ie, <TargetFrameworks>netstandard2.1;net472</TargetFrameworks>
我有一个针对多个框架的 .NET 项目,即<TargetFrameworks>netstandard2.1;net472</TargetFrameworks>
The project contains NuGet packages that bring in System.* dependencies like System.Memory
and System.Buffers
.该项目包含 NuGet 包,这些包引入了 System.* 依赖项,例如System.Memory
和System.Buffers
。
When I build the project it creates two output directories, netstandard2.1
and net472
, which is fine.当我构建项目时,它会创建两个 output 目录netstandard2.1
和net472
,这很好。
The bit I'm struggling to understand is why does the net472
output directory contain the System.* dependencies?我很难理解的是为什么net472
output 目录包含 System.* 依赖项? I understand them being copied to the netstandard2.1
directory, but why are they copied for the .NET Framework directory when they can be loaded from the .NET Framework installation on the machine (ie, GAC)?我知道它们被复制到netstandard2.1
目录,但是为什么当它们可以从机器上的 .NET 框架安装(即 GAC)加载时,它们被复制到 .NET 框架目录?
Is there a way to exclude System.* dlls when for the net472
target?对于net472
目标,有没有办法排除 System.* dll?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.