0

I have a problem reguarding the source files and symbols using ProGet and VS2017/VS2019.

My scenario is the following

  1. Develop test assembly on my pc
  2. Push mod files on our git server
  3. Get mod files in our TeamCity (2019.1)
  4. Build source in Release mode, pack and publish the AssemblyTest.symbols.nupkg on ProGet (5.2.3)
  5. In VS2017 I've create a test console app, install the AssemblyTest via Package Reference and I've tried simply to press F12 on the class in my code to show the source code or step in in debug mode.

I've configure VS2017 as the guide suggests here

The nuget pack command was launched with -symbols command line parameter and the symbol.nupkg was created with the following stucture

  • package
    • service
    • metadata
      • ...
  • lib
    • net472
      • TestAssembly.dll
      • TestAssembly.pdb
      • TestAssembly.xml
  • src
    • Properties
      • AssemblyInfo.cs
    • TestClass.cs

Pressing F12 on TestClass in my code the pdb was correctly downloaded in

c:\users\me\appdata\local\temp\symbolcache\testassembly.pdb\bf5be5cd155e4400b9b18c0e1e6a05941\testassembly.pdb

and selecting ReSharper item form the drop down list on the output window in Visual Studio I see

PdbNavigator: Downloader: http://srv.symbolsource.org/pdb/Public/testassembly.pdb/bf5be5cd155e4400b9b18c0e1e6a05941/testassembly.pdb -> The remote server returned an error: (500) Internal Server Error. 
--OK, it's MS symbol server

PdbNavigator: Downloader: http://myproget/symbols/dev/testassembly.pdb/bf5be5cd155e4400b9b18c0e1e6a05941/testassembly.pdb -> ok, 15.5 KB
-- OK, it's our ProGet server

PdbNavigator: Searching for 'TestAssembly.TestClass' type sources in C:\Users\me\AppData\Local\Temp\SymbolCache\TestAssembly.pdb\bf5be5cd155e4400b9b18c0e1e6a05941\TestAssembly.pdb

PdbNavigator: Downloader: http://myproget/source-files/dev/TestAssembly/1.0.0.10/TestClass.cs -> The remote server returned an error: (404) Not Found.
-- Here we come :(

PdbNavigator: No sources found in debugging information for 'TestAssembly.TestClass' in assembly 'TestAssembly, Version=1.0.0.10, Culture=neutral, PublicKeyToken=null'

In my symbolcache folder there is a subfolder with this path

C:\Users\me\AppData\Local\Temp\SymbolCache\src\source-files\dev\TestAssembly\1.0.0.10

but there's no source file instead.

Taking a look inside the pdb file and I've found

SRCSRV: ini ------------------------------------------------
VERSION=2
INDEXVERSION=2
VERCTRL=http
SRCSRV: variables ------------------------------------------
SRCSRVVERCTRL=http
PGSERVER=http://myproget/source-files
PGFEED=dev
PGPKGID=TestAssembly
PGPKGVER=1.0.0.10
HTTP_EXTRACT_TARGET=%pgserver%/%pgfeed%/%pgpkgid%/%pgpkgver%/%var2%
SRCSRVTRG=%http_extract_target%
SRCSRVCMD=
SRCSRV: source files ---------------------------------------
c:\buildagent\work\b5cfc05c815c43d9\testassembly\testclass.cs*TestClass.cs
SRCSRV: end ------------------------------------------------

So, my question is: how can I download correctly the source file from ProGet? What's wrong in my scenario?

Thank you!

Fabrizio

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
Faber
  • 2,194
  • 2
  • 27
  • 36

1 Answers1

0

From ProGet's perspective, a 404 is returned by the /source-files/* endpoint in any of the following cases:

  • the feed name (i.e. dev in your example) is not found
  • the feed is not a NuGet feed
  • the symbol server is not enabled for the feed
  • the package version is missing from the /source-files URL
  • the package version is not a valid NuGet version (1.0.0.10 looks OK)
  • the file itself (i.e. TestClass.cs in your example) is not found under the /src folder within the package

That being said, can you verify in the feed itself that those source files are present using the Files tab for version 1.0.0.10 of this package? I know if the normal, non-symbols package is pushed after the symbols one, it can overwrite it which effectively removes those files.

John Rasch
  • 62,489
  • 19
  • 106
  • 139