0

ProGet と VS2017/VS2019 を使用してソース ファイルとシンボルを保護する際に問題があります。

私のシナリオは次のとおりです

  1. PC でテスト アセンブリを開発する
  2. git サーバーに mod ファイルをプッシュする
  3. TeamCity (2019.1) で mod ファイルを取得します
  4. リリース モードでソースをビルドし、ProGet (5.2.3) で AssemblyTest.symbols.nupkg をパックして公開します。
  5. VS2017 では、テスト コンソール アプリを作成し、Package Reference を介して AssemblyTest をインストールしました。コード内のクラスで F12 を押すだけで、ソース コードを表示したり、デバッグ モードでステップインしたりしました。

ガイドがここで示唆しているように、VS2017を構成しました

nuget pack コマンドは -symbols コマンド ライン パラメーターを使用して起動され、symbol.nupkg は次の構造で作成されました。

  • パッケージ
    • サービス
    • メタデータ
      • ...
  • ライブラリ
    • net472
      • TestAssembly.dll
      • TestAssembly.pdb
      • TestAssembly.xml
  • ソース
    • プロパティ
      • AssemblyInfo.cs
    • TestClass.cs

私のコードのTestClassでF12を押すと、pdbが正しくダウンロードされました

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

Visual Studioの出力ウィンドウのドロップダウンリストからReSharperアイテムを選択すると、

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'

私のシンボルキャッシュフォルダーには、このパスのサブフォルダーがあります

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

代わりにソースファイルはありません。

pdb ファイルの中を調べてみると、

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 ------------------------------------------------

私の質問は、ProGet からソース ファイルを正しくダウンロードするにはどうすればよいですか? 私のシナリオで何が問題になっていますか?

ありがとうございました!

ファブリツィオ

4

1 に答える 1

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.

于 2019-05-31T14:49:19.437 に答える