Indirect NuGet-reference to another repository prevents NuKeeper from running.
Closed this issue ยท 2 comments
๐ Bug Report
I have a private repository with only my own packages. One of it references a newer version of a package from NuGet.org.
When I do a update with NuKeeper I get the following error:
Updating 'MyRepo.Logging' to 12.0.0-preview.121505 in 2 projects
In path D:\a\1\s\MyRepo.Diagnostics.Entitites, running command: dotnet restore MyRepo.Diagnostics.Entitites.csproj -s https://api.nuget.org/v3/index.json -s https://pkgs.dev.azure.com/root-nine/_packaging/ePlatoOwn/nuget/v3/index.json -s "C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\\"
In path D:\a\1\s\MyRepo.Diagnostics.Entitites, running command: dotnet add MyRepo.Diagnostics.Entitites.csproj package MyRepo.Logging -v 12.0.0-preview.121505 -s https://pkgs.dev.azure.com/root-nine/_packaging/ePlatoOwn/nuget/v3/index.json
Command dotnet failed with exit code: 1
Determining projects to restore...
Writing C:\Users\VssAdministrator\AppData\Local\Temp\tmp2C6F.tmp
info : Adding PackageReference for package 'MyRepo.Logging' into project 'MyRepo.Diagnostics.Entitites.csproj'.
info : Restoring packages for D:\a\1\s\MyRepo.Diagnostics.Entitites\MyRepo.Diagnostics.Entitites.csproj...
info : CACHE https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/MyRepo.logging/index.json
info : GET https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/MyRepo.logging/12.0.0-preview.121505/MyRepo.logging.12.0.0-preview.121505.nupkg
info : OK https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/MyRepo.logging/12.0.0-preview.121505/MyRepo.logging.12.0.0-preview.121505.nupkg 313ms
info : GET https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/serilog.exceptions/index.json
info : NotFound https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/serilog.exceptions/index.json 78ms
info : Installed MyRepo.Logging 12.0.0-preview.121505 from https://pkgs.dev.azure.com/root-nine/_packaging/ePlatoOwn/nuget/v3/index.json with content hash 31vIOtLbn+fLy+hwO8/A4PKM7PdOiSp5jxmYE5NWEux9eKBXPEDzlv5GYJnGefTKnwqhajr3vfvgKSe+2xzWgQ==.
error: NU1101: Unable to find package Serilog.Exceptions. No packages exist with this id in source(s): ePlatoOwn
error: Package 'MyRepo.Logging' is incompatible with 'all' frameworks in project 'MyRepo.Diagnostics.Entitites.csproj'.
Updates failed NuKeeperException : Command dotnet failed with exit code: 1
Determining projects to restore...
Writing C:\Users\VssAdministrator\AppData\Local\Temp\tmp2C6F.tmp
info : Adding PackageReference for package 'MyRepo.Logging' into project 'MyRepo.Diagnostics.Entitites.csproj'.
info : Restoring packages for D:\a\1\s\MyRepo.Diagnostics.Entitites\MyRepo.Diagnostics.Entitites.csproj...
info : CACHE https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/MyRepo.logging/index.json
info : GET https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/MyRepo.logging/12.0.0-preview.121505/MyRepo.logging.12.0.0-preview.121505.nupkg
info : OK https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/MyRepo.logging/12.0.0-preview.121505/MyRepo.logging.12.0.0-preview.121505.nupkg 313ms
info : GET https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/serilog.exceptions/index.json
info : NotFound https://pkgs.dev.azure.com/root-nine/_packaging/c45eca74-e6f2-43b7-b210-c7176f98ae36/nuget/v3/flat2/serilog.exceptions/index.json 78ms
info : Installed MyRepo.Logging 12.0.0-preview.121505 from https://pkgs.dev.azure.com/root-nine/_packaging/ePlatoOwn/nuget/v3/index.json with content hash 31vIOtLbn+fLy+hwO8/A4PKM7PdOiSp5jxmYE5NWEux9eKBXPEDzlv5GYJnGefTKnwqhajr3vfvgKSe+2xzWgQ==.
error: NU1101: Unable to find package Serilog.Exceptions. No packages exist with this id in source(s): ePlatoOwn
error: Package 'MyRepo.Logging' is incompatible with 'all' frameworks in project 'MyRepo.Diagnostics.Entitites.csproj'.
at NuKeeper.Update.ProcessRunner.ExternalProcess.Run(String workingDirectory, String command, String arguments, Boolean ensureSuccess) in d:\a\r1\a\drop\NuKeeper.Update\ProcessRunner\ExternalProcess.cs:line 63
at NuKeeper.Update.Process.DotNetUpdatePackageCommand.Invoke(PackageInProject currentPackage, NuGetVersion newVersion, PackageSource packageSource, NuGetSources allSources) in d:\a\r1\a\drop\NuKeeper.Update\Process\DotNetUpdatePackageCommand.cs:line 37
at NuKeeper.Update.UpdateRunner.Update(PackageUpdateSet updateSet, NuGetSources sources) in d:\a\r1\a\drop\NuKeeper.Update\UpdateRunner.cs:line 52
at NuKeeper.Engine.Packages.PackageUpdater.MakeUpdatePullRequests(IGitDriver git, RepositoryData repository, NuGetSources sources, SettingsContainer settings, IReadOnlyCollection`1 updates) in d:\a\r1\a\drop\NuKeeper\Engine\Packages\PackageUpdater.cs:line 79
at NuKeeper.Engine.Packages.PackageUpdater.MakeUpdatePullRequests(IGitDriver git, RepositoryData repository, IReadOnlyCollection`1 updates, NuGetSources sources, SettingsContainer settings) in d:\a\r1\a\drop\NuKeeper\Engine\Packages\PackageUpdater.cs:line 46
Attempted 7 updates and did 0
Done at 2021-03-20T09:57:19Z
Finishing: NuKeeper
I think the problem is that my private repository doesn't contain the referenced package Serilog.Exceptions.
When NuKeeper calls the dotnet add package
command it only adds one source with -s
so Serilog.Exceptions can't be found.
Expected behavior
The new version is references.
Reproduction steps
Update a package reference which references a new package which only exists in another feed.
Configuration
Version: 0.34.0
Platform if applicable:
- ๐ ๏ธ NuKeeper CLI
- โจ GitHub
- ๐ค AzureDevops
- ๐ Bitbucket
- ๐ Gitlab
- ๐บ Gitea
- ๐ณ Docker
I tried to add several sources with -s
but this doesn't work. So I think adding -n
to the add command will solve this issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.