Skip to content

Conversation

Copy link
Contributor

Copilot AI commented May 19, 2025

Removes PDB creation via usage of the crossgen.exe tool. For .NET Core PDBs are created on package publish, and most machines won't have crossgen or crossgen2 available.

…r .NET Core assemblies

Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
Copilot AI changed the title [WIP] Add a switch to PerfView to disable NGEN Pdb generation for .NET Core assemblies using CrossGen Add a switch to disable NGEN PDB generation for .NET Core assemblies using CrossGen May 19, 2025
Copilot AI requested a review from brianrob May 19, 2025 21:14
/// </summary>
public static SymbolReader GetSymbolReader(string etlFilePath = null, SymbolReaderOptions symbolFlags = SymbolReaderOptions.None)
{
// Apply the DisableNGenPdbGeneration option if it's set in the command line
Copy link
Member

Choose a reason for hiding this comment

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

Looking a bit further at the code, there is already a /NoNGenPdbs flag that disables NGEN PDB generation. Please undo this entire change.

Instead, please change this PR to remove .NET Core PDB generation that uses crossgen. This is implemented in SymbolReader.cs. The call to HandleNetCorePdbs is what does this. The entire function should be removed. You can also remove GetCrossGenExePath.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the PR to remove the CrossGen PDB generation code as requested. I've removed the HandleNetCorePdbs and GetCrossGenExePath methods from SymbolReader.cs and updated the fallback handling when a CLR directory is not found. I've also reverted the DisableNGenPdbGeneration flag changes since the existing /NoNGenPdbs flag already handles this functionality. Changes are in commit 9d0f742.

Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
@brianrob brianrob changed the title Add a switch to disable NGEN PDB generation for .NET Core assemblies using CrossGen Remove PDB generation for .NET Core assemblies using CrossGen May 19, 2025
@brianrob brianrob marked this pull request as ready for review May 19, 2025 22:31
@brianrob brianrob requested a review from cincuranet as a code owner May 19, 2025 22:31
@brianrob brianrob merged commit 1d1348f into main May 27, 2025
5 checks passed
@brianrob brianrob deleted the copilot/fix-2091 branch May 27, 2025 15:35
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