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!

Visual Studio can't find the source...



  • I have a package that I am unable to get source indexing working on. VS is downloading the PDB, but not able to get the source. The problem is when I try to step into a line of code from the package VS is unable to find it.

    In VS "Just my code" is off and "Enable source server support" is on.

    I looked in fiddler and I can see the symbols being downloaded, but I don't see any requests from VS for the source.

    srctool says none of the files are index.

    c:\>srctool c:\source\symbols\Orbis.OA.Framework.Core.pdb\BEE6D23881A74643BC674C92062AF8D51\Orbis.OA.Framework.Core.pdb c:\source\symbols\Orbis.OA.Framework.Core.pdb\BEE6D23881A74643BC674C92062AF8D51\Orbis.OA.Framework.Core.pdb: none of the 3 source files are indexed
    

    pdbsrc shows seemingly correct srcsrv details. And if I contstruct the source URL in the browser I get the source.

    c:\>pdbstr.exe -r -s:srcsrv -p:c:\source\symbols\Orbis.OA.Framework.Cor
    e.pdb\BEE6D23881A74643BC674C92062AF8D51\Orbis.OA.Framework.Core.pdb
    SRCSRV: ini ------------------------------------------------
    VERSION=2
    INDEXVERSION=2
    VERCTRL=http
    SRCSRV: variables ------------------------------------------
    SRCSRVVERCTRL=http
    PGSERVER=http://nuget.orbisaccess.com/source-files
    PGFEED=internal
    PGPKGID=Orbis.OA.Framework.Core
    PGPKGVER=0.1.0-ci0005
    HTTP_EXTRACT_TARGET=%pgserver%/%pgfeed%/%pgpkgid%/%pgpkgver%/%var2%
    SRCSRVTRG=%http_extract_target%
    SRCSRVCMD=
    SRCSRV: source files ---------------------------------------
    c:/tc/buildagent/work/7185b5ab5ed6f01a/core/domainnameattribute.cs*DomainNameAttribute.cs
    c:/tc/buildagent/work/7185b5ab5ed6f01a/core/exceptions/staledataexception.cs*Exceptions/StaleDataExc
    eption.cs
    c:/tc/buildagent/work/7185b5ab5ed6f01a/core/session/nullsessionscopeprovider.cs*Session/NullSessionS
    copeProvider.cs
    SRCSRV: end ------------------------------------------------
    

    This is what the PDB download says in VS:

    c:\users\p.coleman\documents\visual studio 2015\Projects\ConsoleApplication1\bin\Debug\Orbis.OA.Framework.Core.pdb: Cannot find or open the PDB file.
    ... snip ...
    c:\source\symbols\Orbis.OA.Framework.Core.pdb\bee6d23881a74643bc674c92062af8d51\Orbis.OA.Framework.Core.pdb: Symbols loaded.
    

    And this is what the source loading information in VS reports:

    Locating source for 'c:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\Exceptions\StaleDataException.cs'. (No checksum.)
    The file 'c:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\Exceptions\StaleDataException.cs' does not exist.
    Looking in script documents for 'c:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\Exceptions\StaleDataException.cs'...
    Looking in the projects for 'c:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\Exceptions\StaleDataException.cs'.
    The file was not found in a project.
    Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\'...
    ... snip ...
    Looking in directory 'C:\Program Files (x86)\Windows Kits\10\Include\ucrt'...
    Looking for source using source server...
    The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\Exceptions\StaleDataException.cs.
    The debugger could not locate the source file 'c:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\Exceptions\StaleDataException.cs'.
    
    **When packing in TeamCity this is the output:**
    
    [11:26:00]NuGet command: C:\TC\BuildAgent\plugins\nuget-agent\bin\JetBrains.TeamCity.NuGetRunner.exe C:\TC\BuildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe pack C:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\Framework.Core.csproj -OutputDirectory C:\TC\BuildAgent\work\7185b5ab5ed6f01a\nuget-pack-out -Verbose -Symbols -Properties ReleaseNotes=
    [11:26:00]Starting: C:\TC\BuildAgent\temp\agentTmp\custom_script3014486825383318696.cmd
    [11:26:00]in directory: C:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core
    [11:26:00]JetBrains TeamCity NuGet Runner 8.0.30168.9
    [11:26:00]Registered additional extensions from paths: C:\TC\BuildAgent\plugins\nuget-agent\bin\plugins-2.8
    [11:26:00]Starting NuGet.exe 2.8.50506.491 from C:\TC\BuildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe
    [11:26:00]WARNING: Option 'Verbose' has been deprecated. Use 'Verbosity' instead.
    [11:26:00]Attempting to build package from 'Framework.Core.csproj'.
    [11:26:00]Packing files from 'C:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\bin\Debug'.
    [11:26:00]Using 'Framework.Core.nuspec' for metadata.
    [11:26:01]Id: Orbis.OA.Framework.Core
    [11:26:01]Version: 0.1.0-ci0005
    [11:26:01]Authors: Orbis
    [11:26:01]Description: Framework Core
    [11:26:01]Project Url: http://code.orbisaccess.com/client-app
    [11:26:01]Dependencies: None
    [11:26:01]Added file 'lib\net40\Orbis.OA.Framework.Core.dll'.
    [11:26:01]Added file 'lib\net40\Orbis.OA.Framework.Core.pdb'.
    [11:26:01]Successfully created package 'C:\TC\BuildAgent\work\7185b5ab5ed6f01a\nuget-pack-out\Orbis.OA.Framework.Core.0.1.0-ci0005.nupkg'.
    [11:26:01]Attempting to build symbols package for 'Framework.Core.csproj'.
    [11:26:01]Packing files from 'C:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\bin\Debug'.
    [11:26:01]Using 'Framework.Core.nuspec' for metadata.
    [11:26:01]WARNING: File 'C:\TC\BuildAgent\work\7185b5ab5ed6f01a\Core\bin\Debug\Orbis.OA.Framework.Core.pdb' is not added because the package already contains file 'lib\net40\Orbis.OA.Framework.Core.pdb'
    [11:26:01]Id: Orbis.OA.Framework.Core
    [11:26:01]Version: 0.1.0-ci0005
    [11:26:01]Authors: Orbis
    [11:26:01]Description: Framework Core
    [11:26:01]Project Url: http://code.orbisaccess.com/client-app
    [11:26:01]Dependencies: None
    [11:26:01]Added file 'lib\net40\Orbis.OA.Framework.Core.dll'.
    ... snip ...
    [11:26:01]Added file 'src\Session\NullSessionScopeProvider.cs'.
    [11:26:01]Successfully created package 'C:\TC\BuildAgent\work\7185b5ab5ed6f01a\nuget-pack-out\Orbis.OA.Framework.Core.0.1.0-ci0005.symbols.nupkg'.
    [11:26:01]Process exited with code 0
    

    Product: ProGet
    Version: 3.4.2



  • I believe this has to do with the difference between the filenames in the PDB. The index lists them with different cases and '/'s, while the other PDB block lists them in lowercase with ''s.

    What's the fix?



  • It looks like we are actually handling both / and \ characters already. You may want to try upgrading ProGet, as the logging mechanism has been improved in recent versions which could help in troubleshooting this issue. (warnings will be logged to the ProGet error log in the event of a failure during symbol indexing)



  • Upgraded to 3.7.4 and the problem is fixed. Thanks.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation