I would like to use dotnet restore command to provide two sources using --source flag. First one is in local folder inside project files and second one is on remote server (actually it's official nuget source).
I used dotnet restore
inside teamcity and passed sources as parameters as follow:
LocalFolder https://api.nuget.org/
However when teamcity builds my pipeline, dotnet restore search for packages firstly inside C:\BuildAgent\work\LocalFolder, which is fine - that's what I wanted. But in next step it's looking for second source in C:\BuildAgent\work\https://api.nuget.org/ which is obviously wrong.
I dont know how to combine two sources within one dotnet restore command when one of the sources is local and second one is hosted on the server. Is there any workaround for that?
@Edit
I know I can create two build steps with seperate dotnet restore
commands. One for local source and second one for server. However It would be nice to combine it within one command.
restore
command here? – jpgrassidotnet restore
command. But in the build log it's something like that:dotnet restore -s LocalFolder -s https://api.nuget.org/
. According to Microsoft's docs that should be working, but it's looking for two local folders. – star213dotnet restore
as a powershell command. You can still use the TeamCity variables there, just need to pass it to the powershell task. – jpgrassi