TC: pdb via nuget

Answered

Hello.

Problems with pdb files - I can't put them in nuget server.
 In the case of nuget, I have a snupkg generated for two packages (I will consider the example of one only):

Here are the logs:

log for nupkg

[dotnet nuget push] .NET SDK 3.1.202 C:\Program Files\dotnet\dotnet.exe nuget push C:\BuildAgent\work\f64412b9060e5a00\MyApp\bin\Release\MyApp.1.1.289.nupkg --api-key ******* --source http://wbuild02:4002/httpAuth/app/nuget/feed/_Root/default/v3/index.json --force-english-output
[22:48:15]
[dotnet nuget push] Starting: C:\Program Files\dotnet\dotnet.exe nuget push C:\BuildAgent\work\f64412b9060e5a00\MyApp\bin\Release\MyApp.1.1.289.nupkg --api-key ******* --source http://wbuild02:4002/httpAuth/app/nuget/feed/_Root/default/v3/index.json --force-english-output
[22:48:15]
[dotnet nuget push] in directory: C:\BuildAgent\work\f64412b9060e5a00
[22:48:18]
[dotnet nuget push] Pushing MyApp.1.1.289.nupkg to 'http://wbuild02:4002/httpAuth/app/nuget/feed/_Root/default/v2'...
[22:48:18]
[dotnet nuget push] PUT http://wbuild02:4002/httpAuth/app/nuget/feed/_Root/default/v2/
[22:48:18]
[dotnet nuget push] OK http://wbuild02:4002/httpAuth/app/nuget/feed/_Root/default/v2/ 91ms
[22:48:18]
[dotnet nuget push] Your package was pushed.
[22:48:18]
[dotnet nuget push] Process exited with code 0

 

 

log for snupkg


[Step 7/7] dotnet nuget push
[22:48:18]
[dotnet nuget push] .NET SDK 3.1.202 C:\Program Files\dotnet\dotnet.exe nuget push C:\BuildAgent\work\f64412b9060e5a00\MyApp\bin\Release\MyApp.1.1.289.snupkg --api-key ******* --source http://wbuild02:4002/httpAuth/app/nuget/feed/_Root/default/v3/index.json --force-english-output
[22:48:18]
[dotnet nuget push] Starting: C:\Program Files\dotnet\dotnet.exe nuget push C:\BuildAgent\work\f64412b9060e5a00\MyApp\bin\Release\MyApp.1.1.289.snupkg --api-key ******* --source http://wbuild02:4002/httpAuth/app/nuget/feed/_Root/default/v3/index.json --force-english-output
[22:48:18]
[dotnet nuget push] in directory: C:\BuildAgent\work\f64412b9060e5a00
[22:48:19]
[dotnet nuget push] Process exited with code 0


My config for pack & push:
dsl config

dotnetPack {
name = "NuGetPack_DotNetCoreV3.1"
projects = "MyApp/MyApp.csproj"
configuration = "Release"
args = "--include-symbols -p:SymbolPackageFormat=snupkg"
logging = DotnetPackStep.Verbosity.Normal
param("dotNetCoverage.dotCover.home.path", "%teamcity.tool.JetBrains.dotCover.CommandLineTools.DEFAULT%")
}

dotnetNugetPush {
name = "Nuget_dotnetcore_push"
packages = """
MyApp\bin\Release\MyApp.%MajorVersion%.%MinorVersion%.%build.number%.*nupkg

""".trimIndent()
serverUrl = "%teamcity.nuget.feed.httpAuth._Root.default.v3%"
apiKey = "******"
param("dotNetCoverage.dotCover.home.path", "%teamcity.tool.JetBrains.dotCover.CommandLineTools.DEFAULT%")
}

 

Just a question about versions - what kind of jumps between v3 and v2 (see nupkg case only)? What api is used  as a result --  v2?
Judging by the fact that there is no PUT-OK for snupkg, it does not get anywhere.
So,  when I update nuget pkg via TC server there is only dll in the folder on the local computer, no pdb file.

Also in artifacts builds only nupkg, no snupkg.

In general, where do the symbols go, namely MyApp.1.1.289.snupkg?

Nuget - 5.7.0, TC - 2020.1

0
1 comment

Hi Anton,

.snupkg packages are not supported by TeamCity yet. Please follow these feature requests to get notified when the support is implemented:

TW-57874 Symbol server: support *.snupkg packages
TW-64549 Allow Nuget Feed to serve snupkg packages to enable debugging assemblies inside nupkg using SourceLink

In the meantime, you can index the .pdb files with Symbol Files Indexer build feature as explained here.

-Anatoly  

Register for TeamCity Technology Day - Nov 5th

0

Please sign in to leave a comment.