Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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 - PDB Incorrectly Indexed

    Scheduled Pinned Locked Moved Support
    progetsymbols
    5 Posts 1 Posters 15 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      VS correctly requests and receives the PDB from the symbol server, but the subsequently requests the incorrect source file. Output from pdbstr.exe reveals the issue:

      SRCSRV: source files ---------------------------------------

      [BaseDirectory]\contracts\exceptionformatter.cs*ExceptionFormatter.cs

      [BaseDirectory]\contracts\streamclient.cs*Client.cs ** INCORRECT **

      [BaseDirectory]\contracts\properties\resources.designer.cs*Properties/Resources.Designer.cs

      [BaseDirectory]\contracts\channelfactoryextensions.cs*ChannelFactoryExtensions.cs

      [BaseDirectory]\contracts\client.cs*Client.cs

      [BaseDirectory]\contracts\argumentformatter.cs*ArgumentFormatter.cs

      SRCSRV: end ------------------------------------------------

      Decompiled Inedo.ProGet.WebApplication.SimpleHandlers.SymbolServerHandler @ ProGet.WebApplication. In ProcessRequestInternal there is a loop to match pdb source file paths to nuget package source files using an IndexOf. In my example, IndexOf results in two matches (Client.cs and StreamClient.cs) and then incorrectly writes the first. IndexOf may also be problematic for same-named files in different sub-directories.

      Maybe one potential solution is to first establish a common base path, then match on the remaining relative path in the nuget package:

          /// <summary>
          /// Finds the source base path.
          /// </summary>
          /// <param name="sourceFiles">The source file paths in the NuGet package under the 'src' directory.</param>
          /// <param name="referencedSources">The referenced sources obtained from srctool.exe.</param>
          /// <returns>The most common source base path with respect to matching files in the NuGet package.</returns>
          private static string FindSourceBasePath(IEnumerable<string> sourceFiles, IEnumerable<string> referencedSources)
          {
              return referencedSources.Aggregate(
                  referencedSources.First(),
                  (b, s) =>
                  {
                      while ((!s.StartsWith(b, StringComparison.OrdinalIgnoreCase) || !sourceFiles.Contains(Path.Combine("src", s.Substring(b.Length)), StringComparer.OrdinalIgnoreCase)) && b.Length > 0)
                      {
                          b = b.Substring(0, b.Length - 1);
                      }
                      return b;
                  });
          }
      

      Product: ProGet
      Version: 3.3.11

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        I'm having a similar problem. Will keep an eye on this.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Thanks for this investigation and suggested fix. We'll look into implementing something like this for the next maintenance release.

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            Just to let you know- we should have this fix in ProGet v3.4, scheduled for Friday (January 9). There is a smaller maintenance release scheduled for today, but that will not include this fix due to the amount of testing required.

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              Proget 3.4.4

              Visual Studio fetches the PDB correctly to the symbols cache, but then searches for the source with a local path used on our build server. Sources are not downloaded.

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post
              Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation