jenkins部署.net项目时报错:error NU1101:Unable to find package WLYD.Core

执行dotnet publish时报错

疑问:

jenkins所在的linux服务器上,已经配置了nuget.config

并且其他的项目运行时正常,只有这个项目报了错。

这个项目在linux服务器上运行此命令不报错,但是在jenkins构建时要报错。

这个项目的csproj中,配置如下:引用nuget包

其他不报错的项目的csproj配置如下:引用本解决方案中的项目

解决方法:

在linux服务器上,把nuget.config复制到此项目的sln同级目录下

再运行,就不报错。

具体原因不清楚,目前是解决了问题。

参考文章:

https://stackoverflow.com/questions/56106810/error-nu1101-unable-to-find-package-projectabc-core-services-no-packages-exist

这个人也是在持续集成过程中报了相似的错误