[英]How to include references from a custom feed in a .nuspec file?
I have a C# library published at nuget.org
.我有一个在 nuget.org 上发布的
nuget.org
库。 One of its dependencies is not on nuget.org
, but on myget.org
.它的依赖项之一不在
nuget.org
上,而是在myget.org
上。 When others try to use my library, package restore fails with the following message:当其他人尝试使用我的库时,package 还原失败并显示以下消息:
Error NU1102 Unable to find package SixLabors.ImageSharp.Drawing with version (>= 1.0.0-unstable0418)
- Found 7 version(s) in nuget.org [ Nearest version: 1.0.0-beta0007 ]
- Found 0 version(s) in Microsoft Visual Studio Offline Packages
How can I specify in the .nuspec
file, that this dependency should be restored from a different repo (I'd prefer this solution)?如何在
.nuspec
文件中指定应该从不同的 repo 恢复此依赖项(我更喜欢此解决方案)? Or alternatively how do I include this package in my package as a dependency?或者,我如何将这个 package 作为依赖项包含在我的 package 中?
Looks like this is by design with few alternatives mentioned in the following docs https://github.com/NuGet/Home/issues/6008看起来这是设计使然,以下文档https://github.com/NuGet/Home/issues/6008中提到了一些替代方案
https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1102 https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1102
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.