在项目中我使用依赖项
<PackageReference Include = "Steeltoe.Bootstrap.Autoconfig" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Extensions.Configuration.ConfigServerBase" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Messaging.RabbitMQ" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Management.CloudFoundryCore" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Discovery.Eureka" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Management.EndpointCore" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Common" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Common.Hosting" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Common.Http" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Connector.CloudFoundry" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Connector.EFCore" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Discovery.ClientCore" Version = "3.1.0" />
<PackageReference Include = "Steeltoe.Extensions.Configuration.ConfigServerCore" Version = "3.1.0" />
但是如果你添加一个依赖:
<PackageReference Include = "Steeltoe.Connector.ConnectorCore" Version = "3.1.0" />
然后当应用程序启动时,它给出了一个错误:
无法从根提供程序解析范围服务“RabbitMQ.Client.IConnectionFactory”。
通过删除此依赖关系解决了该问题。如果我理解正确,那么这个地方就有交叉逻辑。也许您不打算共享这些软件包。但事实就在表面上。共享是不可能的。