Skip to content

Save RTM build symbols for publishing#3714

Merged
zivkan merged 3 commits intodevfrom
dev-zivkan-fix-rtm-symbols-publishing
Oct 15, 2020
Merged

Save RTM build symbols for publishing#3714
zivkan merged 3 commits intodevfrom
dev-zivkan-fix-rtm-symbols-publishing

Conversation

@zivkan
Copy link
Member

@zivkan zivkan commented Oct 12, 2020

Bug

Related: https://github.com/nuget/client.engineering/issues/338
Regression: No

  • Last working version:
  • How are we preventing it in future:

Fix

Details: Save RTM symbols on file share, so they can be published during the release process.

Testing/Validation

Tests Added: No
Reason for not adding tests: CI build script change
Validation:

@zivkan zivkan requested a review from a team as a code owner October 12, 2020 20:30
Copy link
Contributor

@donnie-msft donnie-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did/will you be modifying the release playbook to include these new symbols?

Projects="@(SolutionProjectsWithoutVSIX)"
Targets="GetSymbolsToIndex">
Targets="GetSymbolsToIndex"
Properties="NoBuild=true;">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I know what's this for? Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you run symbols.proj locally, you'll see that it re-runs ilmerge on nuget.exe, and probably the NuGet.Build.Tasks.Pack.dll. This means, the exe, and symbols for these components are regenerated. I don't know what heuristics the debugger uses to determine the symbols "key" to get from the server, but if the second ilmerge changes the exe and pdb too much, then the symbols we publish will not match the binaries published, and noone will be able to debug those binaries.

So, by telling the .NET SDK not to rebuild, it avoids our ilmerge target from running, and we can publish the pdbs that were generated at the same time the published binaries were generated.

An alternative, which we should eventually do anyway, is improve our ilmerge task to use msbuild's incremental build to avoid needlessly ilmerging so many times. When running builds locally, or if you look carefully at our CI logs, you'll see we actually ilmerge nuget.exe multiple times, because msbuild doesn't know how to determine if the previous copy is already up-to-date. THis is a particular risk for signed assemblies, because if we ilmerege a new nuget.exe and overwrite a signed nuget.exe, then we lose the authenticode signature.

@zivkan zivkan merged commit cb36251 into dev Oct 15, 2020
@zivkan zivkan deleted the dev-zivkan-fix-rtm-symbols-publishing branch October 15, 2020 17:40
zivkan added a commit that referenced this pull request Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants