Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Symbol Server for portable pdb



  • Hi,

    is it possible to use ProGet Symbol Server in combination with SourceLink PDBs?

    We are creating nuget (nupkg) and source (snupkg) packages.

    How do I have to configure the feeds to provide nupkg and work as Symbol Server
    providing symbol information via SourceLink?

    How can I push a snupkg to the feed?

    Many thanks in advance.

    Best regards
    Christian


  • inedo-engineer

    Hi @christian_panten_6482,

    Since you are using SourceLink, you should be able to use the Symbol Server built into ProGet as long as you have ProGet running on Windows. For information on setting up a symbol server and pushing packages to it, please review our NuGet Symbol and Source Server documentation.

    Hope this helps!

    Thanks,
    Rich



  • Hi @rhessinger,

    I run proget on windows and configured a separate feed for the symbol nuget
    packages. I enabled Symbol Server functionality for this feed.

    http://proget:8624/nuget/sýmbol-feed/v3/index.json

    My nuget config looks like this:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <activePackageSource>
        <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
      </activePackageSource>
      <packageRestore>
        <add key="enabled" value="True" />
        <add key="automatic" value="True" />
      </packageRestore>
      <packageSources>
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
        <add key="symbols-feed" value="http://proget:8624/nuget/symbols-feed/v3/index.json" />
        <add key="packages-feed" value="http://proget:8624/nuget/packages-feed/v3/index.json" />    
      </packageSources>
      <bindingRedirects>
        <add key="skip" value="False" />
      </bindingRedirects>
      <apikeys>
        <add key="http://proget:8624/nuget/symbols-feed/v3/index.json" value="AQAAANxxxxxxxxxxxxxxxxxxxxx==" />
        <add key="http://proget:8624/nuget/packages-feed/v3/index.json" value="AQAAANxxxxxxxxxxxxxxxxxxxxx==" />
      </apikeys>
    <packageSourceCredentials>
     <symbols-feed>
      <add key="Username" value="Example" />
      <add key="ClearTextPassword" value="Pwd" />
     </symbols-feed>
     <packages-feed>
      <add key="Username" value="Example" />
      <add key="ClearTextPassword" value="Pwd" />
     </packages-feed>
    </packageSourceCredentials>
      <packageManagement>
        <add key="format" value="0" />
        <add key="disabled" value="False" />
      </packageManagement>
      <disabledPackageSources>
      </disabledPackageSources>
    </configuration>
    

    Now I build my package using:

    dotnet pack -c Release
    

    This results in:

    MyPackage.1.2.0.nupkg
    MyPackage.1.2.0.snupkg
    

    Using nuget I can push the package to proget:

    nuget push -source packages-feed MyPackage.1.2.0.nupkg
    

    This works well.

    But how can I push the snupkg to proget feed symbols-feed?

    Best regards
    Christian


  • inedo-engineer

    Hi @christian_panten_6482,

    You would just push the snupkg the same way, but only push the snupkg. For example:

    nuget push -source sources-feed MyPackage.1.2.0.snupkg
    

    I also wanted to point out this from our documentation as well:

    To summarize, push only the symbol package to your ProGet feed if you intend to use the symbol server. To prevent symbols from being downloaded with the NuGet package, see the Strip symbol files from packages downloaded from this feed option on the Manage Feed page under Symbol Server settings.

    Thanks,
    Rich



  • Hi @rhessinger,

    I don't know why, but using this push does not work for me.
    I don't see any response and the package is not uploaded.

    Did you try it?

    Best regards
    Christian



  • Hi,

    if I take a look on the result of link I can see this section
    which I am missing in the corresponding link to our ProGet feed.

    d892c232-a196-4489-af83-eea9591b804c-image.png

    Could this the reason why nuget push -source symbols-feed MyPackage.1.2.0.snupkg
    is failing?

    Best regards
    Christian


  • inedo-engineer

    Hi @christian_panten,

    Can you please send over the error you are seeing when running nuget push? As long as your -Source is the NuGet API URL, then you shouldn't need to do anything special.

    Thanks,
    Rich



  • @rhessinger

    here is a screen shot of my push.
    bac64072-167e-446b-8c7f-98f1b83becc7-image.png

    as you can see:

    • pushing nupkg to packages feed works fine
    • pushing snupkg to packages feed failed
    • pushing snupkg to symbols feed failed too

    c4517843-1938-4e0d-b31f-72e1b9cfc61e-image.png

    496e6ddf-0f2a-4d6f-ba82-efc68c0ad8f8-image.png

    Best regards
    Christian


  • inedo-engineer

    Hi @christian_panten,

    Are there any errors showing in the Diagnostics center?

    Thanks,
    Rich



  • @rhessinger,

    No there are no messages.

    Best regards
    Christian


  • inedo-engineer

    First off, if you want to have separate library and symbols packages (which we don't recommend), then you'll need to make a separate symbols feed. ProGet supports a "combined package" and will strip out symbols/source unless explicitly requested, so you don't have to bother.

    But if you want to separate, please note that nuget is a "little" funny. If the file extension ends in .snupkg then it ignores the source argument, and attempts to push the file to Microsoft's server (symbols.nuget.org).

    This is because symbol packages and regular packages must be pushed to a different feed. If you want to specify a custom symbols feed, then please use the --symbol-source when using a .snupkg file.

    @christian_panten I have a favor.... can you suggest (or do a pull request) on how we can update our documentation to make this more clear? Thanks 😄



  • Hi @atripp,

    your proposal to use --symbol-source does not work with .snupkg. As you can see there is an
    exception pushing only the snupkg file.

    ee0fb95a-a38a-4103-8379-9bbe87960ed6-image.png

    Also pushing both files at the same time is pushing only the nupkg.
    5e097763-23f4-4869-8168-f5f02affe2f7-image.png

    I don't have any idea how to continue. Do you have further steps to try?

    Were you able to run the same tests on your machines?

    Best regards
    Christian


  • inedo-engineer

    @christian_panten as I mentioned, we recommend making a single symbol package to avoid this kind of headache (it changes between versions of nuget CLI 😦 ), and I don't use nuget.exe to push packages in this manner so I can't say it

    If you were to just upload or PUT the package to ProGet, then it would work fine. So we are just trying to figure out nuget.exe's quirks, and why he refuses to push to a custom symbol source...

    The screenshot you showed seems to be fine. I also read the nuget.exe push documentation.

    I don't think you're supposed to specify the snupkg file. I believe he will search for a .snupkg and then push it? It's hard for a guess.

    I also remember this was broken for a while in nuget.exe (not using of SymbolApi at all), but it works in dotnet push.



  • @atripp

    We are not using proget as default nuget package source.
    Our company decided to use artifactory as nuget repository.
    So, we don't want to create nuget packages including the pdb files.

    I would like to find out if the symbol server of proget is able to
    provide us the portable pdb files.

    Currently, including the pdbs in the original nuget package seams to
    work. But it's not an option for us.

    There is no command: dotnet push

    a25cfd73-fe70-4b79-8f34-2df4428ff9d9-image.png

    And dotnet nuget push does also not work. Same issue as nuget.exe.

    How can we proceed?

    Best regards
    Christian


  • inedo-engineer

    I think dot net publish, but remember these are really meant to work with nuget.org. This might be an issue to take up with the NuGet team; it's very possible their tool doesn't support this use case and is buggy.

    It's just an HTTP PUT, so you could do it in a line of PowerShell as well using the Invoke-RestMethod CmdLet: Invoke-RestMethod -Uri $uri -Method Post -InFile $uploadPath

    Here is some more information from NuGet's docs: https://docs.microsoft.com/en-us/nuget/api/package-publish-resource#push-a-package



  • @atripp

    I will try to use the API directly to test if it works.

    dotnet publish is not the command to publish a nuget package. It is use
    to restore nuget dependencies, to build a project and to copy all required
    files to a separate folder.

    Next to your provided link there is a documentation how to push snupkg files. c0d139ca-30ab-4cfe-b20a-bafc4830b69e-image.png
    And as you can see here, it depends on SymbolPackagePublish resource found in the service index.
    But this resource is missing in the service index delivered by our proget installation. Maybe this could be
    a hint for you which can help solving my issue.

    I will let you know if the direct usage of the API solves also my issue.

    Many thanks for you support.

    Best regards
    Christian



  • @atripp

    UPDATE:

    I was able to use curl to upload the snupkg symbols package via:

    curl -v -i -X PUT -H 'X-NuGet-ApiKey: xxx' -F 'file=@./Trimble.MEP.MyPackage.1.4.0.snupkg;' http://localhost/nuget/symbols/package
    

    Best regards
    Christian



  • Since there is no further update and no solution for my problem using nuget cli or dotnet cli I am closing this thread.



  • This post is deleted!

Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation