You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A build keeps going red because it cannot find a specified nuget package from our private feed. We are using the .Net build step with the "restore" command. If i run dotnet restore locally, it works completely fine so the issue is the addition of the dreaded rsp file to the command line.
I opened up the RSP file (quickly) and it contains /p:nuget_feeds=https%3A%2F%2Fapi%2Enuget%2Eorg%2Fv3%2Findex%2Ejson.... which does not include the correct private feed. This appears to be overriding the feeds that are specified in the build step and therefore causing the package not found.
The build has worked until very recently so this probably changed in a recent TC/plugin build (unless other builds have somehow always cached the versions of packages that this build uses). We are running TC 2020.1 (build 78475).
Where do these feeds come from that are added to the rsp file? It is very unhelpful that this file is temporary and is not expanded in the build log because it makes it impossible to debug, especially when lots of builds overwrite that file if you don't read it quickly enough.
Why is the RSP added after the custom source parameters? This means that we can never set them on a per-build basis becaue the RSP settings will always overwrite them.
What are my options?
I have to work around this by getting the build admin to run the restore on the command line so that the package is downloaded and added to local cache then run the build again. That is not satisfactory moving forwards.
Thanks
The text was updated successfully, but these errors were encountered:
As I remember the .NET runner does not add nuget_feeds parameter by itself. Could you check you have no the TeamCity system parameter nuget_feeds in your build configuration or in any parent projects.
Custom arguments should be added after .rsp. Please see this code. Could you share the plugin version and a build log file if it is possible.
You are correct, there is a system parameter called nuget_feeds. I can probably update this to fix.
This is from the build log, note the order of parameters and rsp file: .NET SDK 3.1.101 C:\Program Files\dotnet\dotnet.exe restore Presentation\SmartSurvey.Api\SmartSurvey.Api.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/smartsurveylibs/api/v3/index.json @C:\TeamCity\buildAgent\temp\agentTmp\1.rsp all the plugins appear to be version 78475
A build keeps going red because it cannot find a specified nuget package from our private feed. We are using the .Net build step with the "restore" command. If i run dotnet restore locally, it works completely fine so the issue is the addition of the dreaded rsp file to the command line.
I opened up the RSP file (quickly) and it contains
/p:nuget_feeds=https%3A%2F%2Fapi%2Enuget%2Eorg%2Fv3%2Findex%2Ejson....
which does not include the correct private feed. This appears to be overriding the feeds that are specified in the build step and therefore causing the package not found.The build has worked until very recently so this probably changed in a recent TC/plugin build (unless other builds have somehow always cached the versions of packages that this build uses). We are running TC 2020.1 (build 78475).
I have to work around this by getting the build admin to run the restore on the command line so that the package is downloaded and added to local cache then run the build again. That is not satisfactory moving forwards.
Thanks
The text was updated successfully, but these errors were encountered: