I'm trying to build a .NET Core application that references a NuGet package from a custom feed (I gave up on authentication so it has anonymous access enabled).
I have a local Teamcity instance that runs a dotnet publish
command. I added the --no-restore
flag en prepended a dotnet restore
task in the Teamcity pipeline so I can specify my custom NuGet server using a --source
parameter.
My publish
folder however persistently end up with "My Library" version 0.0.1
instead of the latest version 0.0.2
.
I figured it would be caching and prepended the following command:
dotnet nuget locals --clear all
This actually made the dotnet restore
command iterate the packages and I can see it restoring version 0.0.2
. But where is this actually restored to? The following dotnet publish --no-restore
command doesn't seem to take this restored version into account...
Also further inspection on NuGet caches makes it even more weird as both those locations contain the 0.0.2
version of the library... (%userprofile%\.nuget\packages
and %localappdata%\NuGet\v3-cache
for both my local user as well as the buildagent user)
Any help would be highly appreciated.