首页 > 解决方案 > ServiceStack:在 Blazor 项目中安装“ServiceStack.HttpClient”会增加数百个依赖项?

问题描述

我正在使用 Blazor 进行一些测试,并且由于它是 C#,我认为我可以添加 ServiceStack.HttpClient 以在与后端交谈时使用。

但是,当我看到 NuGet 即将安装的依赖项时,我有点害怕,所以我只想检查这是否正常和预期。我们正在谈论数百个添加的参考。

在此处输入图像描述

这看起来合理吗?runtime.fedora...Cryptography...?

标签: nugetservicestackblazor

解决方案


其中大部分是 ASP.NET Core 依赖项的传递依赖项。

您可以在 NuGet 上查看每个包的依赖项列表:

ServiceStack.HttpClient

ServiceStack.Client (>= 5.5.0)
ServiceStack.Interfaces (>= 5.5.0)
ServiceStack.Text (>= 5.5.0)
System.Collections.Specialized (>= 4.3.0)
System.Net.Requests (>= 4.3.0)
System.ServiceModel.Primitives (>= 4.5.3)
System.Xml.XmlSerializer (>= 4.3.0)

服务堆栈.客户端:

ServiceStack.Interfaces (>= 5.5.0)
ServiceStack.Text (>= 5.5.0)
System.Collections.Specialized (>= 4.3.0)
System.Memory (>= 4.5.2)
System.Net.Requests (>= 4.3.0)
System.ServiceModel.Primitives (>= 4.5.3)
System.Xml.XmlSerializer (>= 4.3.0)

服务堆栈.文本:

Microsoft.CSharp (>= 4.5.0)
System.Memory (>= 4.5.2)
System.Runtime (>= 4.3.0)

服务栈接口

System.Runtime.Serialization.Primitives (>= 4.3.0)

推荐阅读