This was generated by AI during triage.
Failure
The CI build job, attempt 2 passes Restore, Build, Test, and Pack CLI tool. It fails at Install dotnet-crap. The Self-analyze step is skipped.
.github/workflows/ci.yml runs:
dotnet tool install -g Crap4DotNet --add-source ./nupkg
The command exits with:
The --add-source option cannot be combined with package source mapping. To use an additional source, update your NuGet configuration file's source mapping settings.
This failure is in the repository's CI/NuGet configuration, not PR #4's matching code.
Cause
The root nuget.config defines one source, nuget.org, and maps * to it. The install command attempts to add the newly packed ./nupkg directory as a second source. NuGet rejects --add-source while package source mapping is active.
Fix
Use a CI-specific NuGet configuration for the tool-install step. Declare both ./nupkg and nuget.org as package sources. Map the exact package ID Crap4DotNet to ./nupkg; keep the * mapping to nuget.org for the tool's dependencies. Replace --add-source ./nupkg with --configfile <path-to-that-config> in the install command. Keep the repository's normal restore configuration unchanged.
NuGet gives an exact package-ID mapping precedence over *, so the tool package comes from the fresh pack output while other dependencies can come from nuget.org. See Microsoft's package source mapping rules and dotnet tool install options.
Acceptance criteria
- On a clean CI runner, Restore, Build, Test, Pack CLI tool, and Install dotnet-crap all succeed.
- The installed
Crap4DotNet package comes from the package produced by that run, not from nuget.org.
- The Self-analyze with CRAP metrics step starts. Its analysis result remains governed by its existing
continue-on-error: true setting.
Failure
The CI build job, attempt 2 passes Restore, Build, Test, and Pack CLI tool. It fails at Install dotnet-crap. The Self-analyze step is skipped.
.github/workflows/ci.ymlruns:The command exits with:
This failure is in the repository's CI/NuGet configuration, not PR #4's matching code.
Cause
The root
nuget.configdefines one source,nuget.org, and maps*to it. The install command attempts to add the newly packed./nupkgdirectory as a second source. NuGet rejects--add-sourcewhile package source mapping is active.Fix
Use a CI-specific NuGet configuration for the tool-install step. Declare both
./nupkgand nuget.org as package sources. Map the exact package IDCrap4DotNetto./nupkg; keep the*mapping to nuget.org for the tool's dependencies. Replace--add-source ./nupkgwith--configfile <path-to-that-config>in the install command. Keep the repository's normal restore configuration unchanged.NuGet gives an exact package-ID mapping precedence over
*, so the tool package comes from the fresh pack output while other dependencies can come from nuget.org. See Microsoft's package source mapping rules anddotnet tool installoptions.Acceptance criteria
Crap4DotNetpackage comes from the package produced by that run, not from nuget.org.continue-on-error: truesetting.