Handling symbol packages in deployments

chris.eldredge's Avatar


18 Jun, 2014 02:23 PM

I build my NuGet packages with the -symbols flag to build a symbol package that includes debugging symbols and source code.

When I configure my package to be deployed to a NuGet repository, it fails when trying to push the symbols package as in this example build. The relevant part of the log says:

521Packaging artifacts...Done
522Uploading artifact build\artifacts\Lucene.Net.Linq.3.3.0-build62.nupkg (69.8 KB)...Done
523Uploading artifact build\artifacts\Lucene.Net.Linq.3.3.0-build62.symbols.nupkg (251.4 KB)...Done
524Deploying using NuGet provider
525nuget push "C:\projects\lucene-net-linq\build\artifacts\Lucene.Net.Linq.3.3.0-build62.nupkg" -ApiKey ...
526Pushing Lucene.Net.Linq 3.3.0-build62 to 'https://staging.nuget.org/'...
527Your package was pushed.
528nuget push "C:\projects\lucene-net-linq\build\artifacts\Lucene.Net.Linq.3.3.0-build62.symbols.nupkg" -ApiKey ...
529Pushing Lucene.Net.Linq 3.3.0-build62 to 'https://staging.nuget.org/'...
530ERROR: Failed to process request. 'A package with id 'Lucene.Net.Linq' and version '3.3.0-build62' already exists and cannot be modified.'. 
531ERROR: The remote server returned an error: (409) Conflict..
532nuget process exited with code 1

I was able to work around this by using a regex to exclude symbol packages from being deployed, but it seems silly to have to configure this on all my projects. Should AppVeyor be smart enough not to push symbol packages to NuGet Gallery which does not support them?

  1. Support Staff 1 Posted by Feodor Fitsner on 18 Jun, 2014 05:51 PM

    Feodor Fitsner's Avatar

    Sure, we can fix that. Is it safe to assume that file ending with .symbols.nupkg is a package with symbols?

  2. 2 Posted by chris.eldredge on 18 Jun, 2014 06:21 PM

    chris.eldredge's Avatar

    Yes, a package ending with .symbols.nupkg should be treated specially.

    In addition to not attempting to push these packages to nuget.org, the nuget command line client, when pushing e.g. Foo.1.0.nupkg, will check for Foo.1.0.symbols.nupkg in the same directory, and if it finds one it will automatically push the symbols to symbolsource.org.

    If possible, the NuGet Provider should download symbol package artifacts so the default nuget behavior applies.

  3. Support Staff 3 Posted by Feodor Fitsner on 18 Jun, 2014 07:02 PM

    Feodor Fitsner's Avatar

    I see, thank you!

  4. Support Staff 4 Posted by Feodor Fitsner on 02 Oct, 2014 07:01 PM

    Feodor Fitsner's Avatar

    It's been fixed and deployment of symbols added: http://localhost:8092/docs/deployment/nuget

  5. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:48 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac