不幸的是,Nuget.org包的名称与本地开发的一种工具的名称相同,并存储在我们本地的Nuget存储库中。
执行:dotnet add <path to csproj> package <package name> -s <local nuget repository url>
时,它仍然设法在Nuget.org中获取版本。可能是因为我们的软件包是2.0.70
,版本是Nuget 2.1.1
。
是否有一种优雅的解决方案来强制存储库?
其他解决方案包括将软件包的版本推送至10.0.0
或将名称更改为OurCompany.Name
(实际上是正确的方法,但需要在使用该软件包的所有项目中更改引用)。 / p>