The setting AllowPackageOverwrites ignore .snupkg .
If you set AllowPackageOverwrites to false, updated packages on source symbols (.snupckg) are overwritten.
To Reproduce
Steps to reproduce the behavior:
Using this version of BaGet '0.0.0-preview5'
Setup a project to generate packages with any version with source generator included.
e.g.
<PropertyGroup>
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
Publish nuget with a command like dotnet nuget push $(NupkgSourceDir) --skip-duplicate --api-key $(NuGetKey) --source $(NuGetServer)
both packages should be correctly updated
try to upload a second time, now the .nupkg will be rejected correctly (conflict) but the .snupkg will be updated
Describe the bug
The setting
AllowPackageOverwrites
ignore .snupkg . If you setAllowPackageOverwrites
tofalse
, updated packages on source symbols (.snupckg) are overwritten.To Reproduce
Steps to reproduce the behavior:
Setup a project to generate packages with any version with source generator included. e.g.
dotnet nuget push $(NupkgSourceDir) --skip-duplicate --api-key $(NuGetKey) --source $(NuGetServer)
.nupkg
will be rejected correctly (conflict) but the.snupkg
will be updatedExpected behavior
.snupkg
should be rejected too