snupkg symbols are not uploaded to nuget.org
Hi team,
Have trouble publishing symbols to nuget.org
Here is job output i see:
Collecting artifacts...
Found artifact 'SmtpServerStub\bin\Debug\SmtpServerStub.1.1.161-I-3.nupkg' matching '**\SmtpServerStub.*nupkg' path
Found artifact 'SmtpServerStub\bin\Debug\SmtpServerStub.1.1.161-I-3.snupkg' matching '**\SmtpServerStub.*nupkg' path
Found artifact 'SmtpServerStub\bin\Debug\SmtpServerStub.1.1.161-I-3.symbols.nupkg' matching '**\SmtpServerStub.*nupkg' path
Uploading artifacts...
[1/3] SmtpServerStub\bin\Debug\SmtpServerStub.1.1.161-I-3.nupkg (18,843 bytes)...100%
[2/3] SmtpServerStub\bin\Debug\SmtpServerStub.1.1.161-I-3.snupkg (7,311 bytes)...100%
[3/3] SmtpServerStub\bin\Debug\SmtpServerStub.1.1.161-I-3.symbols.nupkg (42,998 bytes)...100%
Deploying using NuGet provider
Publishing SmtpServerStub.1.1.161-I-3.nupkg to https://www.nuget.org/api/v2/package...OK
Total packages published: 1
Build success
Here is my appveyor.yml file fragment
artifacts:
- path: '**\SmtpServerStub.*nupkg'
deploy:
provider: NuGet
api_key:
secure: [API_KEY]
skip_symbols: true
artifact: /.*(\.|\.s)nupkg/
But looks like snupkg file is not uploaded to nuget.org
Please suggest me what do i do wrong?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Feodor Fitsner on 10 Aug, 2020 07:16 PM
Modify
appveyor.yml
as following:2 Posted by valentin.kostiu... on 19 Aug, 2020 05:54 PM
Hi Feodor,
Thanks for your help!
I've implemented suggested changes to appveyor.yml
That still successfully builds but symbols are not published to nuget.org.
I've found this article https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg
And it hase note in it:
````
If the symbol package isn't published, check that you've configured the NuGet.org source as https://api.nuget.org/v3/index.json. Symbol package publishing is only supported by the NuGet V3 API.
````
In build log I see:
````
Deploying using NuGet provider
Publishing SmtpServerStub.1.1.166-I-3.nupkg to https://www.nuget.org/api/v2/package...OK
Total packages published: 1
Build success
````
looks like it publishes to v2 API version. Should I somehow explicitly override target URL to target v3 ?
Great thanks,
Valentin
Support Staff 3 Posted by Feodor Fitsner on 19 Aug, 2020 06:12 PM
Hi Valentin,
Could you drop me a screenshot of build "Artifacts" page please?
4 Posted by valentin.kostiu... on 19 Aug, 2020 06:22 PM
Yes, sure.
Also added console and appveyor.yml screens
Thank you for looking to this!
Support Staff 5 Posted by Feodor Fitsner on 19 Aug, 2020 06:26 PM
I see, thanks.
Remove
skip_symbols: true
from deployment configuration.6 Posted by valentin.kostiu... on 19 Aug, 2020 06:31 PM
Did that, now receive 500 error in log
``````
Deploying using NuGet provider
Publishing SmtpServerStub.1.1.171-I-3.nupkg to https://www.nuget.org/api/v2/package...OK
Publishing SmtpServerStub.1.1.171-I-3.symbols.nupkg to https://nuget.smbsrc.net/api/v2/package...
Error publishing package. NuGet server returned 500: Internal Server Error
```````
Guess that is because now it tries to upload symbols to default nuget.smbsrc.net
Support Staff 7 Posted by Feodor Fitsner on 19 Aug, 2020 06:32 PM
Right, it's because it's trying to publish
.symbols.nupkg
- do not publish it to artifacts.8 Posted by valentin.kostiu... on 19 Aug, 2020 08:18 PM
Hi Feodor,
Great thanks!
That worked!
Had to update regex of deployed artifacts to
artifact: /.*(?<!symbols)(\.|\.s)nupkg/
So it will not mutch legacy symbol files. Did not find how to disable those in msbuild.
I believe you can close this support ticket. :-)
Thank you!
Support Staff 9 Posted by Feodor Fitsner on 19 Aug, 2020 08:32 PM
Cool, thanks for the update!
Feodor Fitsner closed this discussion on 19 Aug, 2020 08:32 PM.