为两个Nuget软件包C#.NET框架使用不同版本的软件包
我需要使用两个软件包软件包1& package2均在同一项目中(相同的.csproj文件),
但都需要不同版本的bond.core.core.csharp我如何使用两个软件包。 依赖性类似于:
package1 - >依赖性 - >依赖性 - >依赖性 - > bond.runtime.csharp 9.0.3-> bond.core.csharp 9.0.3
package2->依赖性 - > bond.runtime.csharp 9.0.3-> bond.core.csharp 9.0.3
<PackageReference Include="Package1" Version=.. />
expect "Bond.Core.CSharp" Version="9.0.1"
<PackageReference Include="Package2" Version=.. />
expect "Bond.Core.CSharp" Version="9.0.3" />
target framework = .NET框架4.7.2
I need to use to use two packages Package1 & Package2 both in same project (same .csproj file)
But both need different version of Bond.Core.CSharp how do i use both packages.
Dependency is like:
Package1
-> dependency -> dependency -> dependency -> Bond.Runtime.Csharp 9.0.3-> Bond.Core.CSharp 9.0.3
Package2 -> dependency -> Bond.Runtime.Csharp 9.0.3-> Bond.Core.CSharp 9.0.3
<PackageReference Include="Package1" Version=.. />
expect "Bond.Core.CSharp" Version="9.0.1"
<PackageReference Include="Package2" Version=.. />
expect "Bond.Core.CSharp" Version="9.0.3" />
TargetFrameWork = .Net Framework 4.7.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果第一个软件包需要9.0.1和第二个9.0.3,则可以尝试在项目中直接需要9.0.3版。我希望Package1对您已经需要的版本会很好。
换句话说,为所需版本的
bond.runtime.csharp
添加packageReference
,以减轻冲突的解决。If the first package requires 9.0.1 and the second 9.0.3, you can try requiring directly version 9.0.3 in you project. I would expect Package1 to be fine with the version you are already requiring.
In other words, add a
PackageReference
for the desired version ofBond.Runtime.Csharp
in order to ease the resolution of conflicts.