Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 4, 2025

Summary: Suppress Advertising Manifest Messages

This PR fixes the issue where advertising manifest messages are displayed during workload install operations. According to the requirements, these messages should only appear when verbosity is set to diagnostic (diag).

What was the problem?

Users were seeing these messages during normal workload install operations:

  • "Advertising manifest not updated. Manifest package for {manifest} doesn't exist."
  • "Failed to update the advertising manifest {manifest}: {error}."

These messages were being displayed even at normal verbosity levels, which cluttered the output.

Additionally, on unsigned .NET versions, the message "Skipping NuGet package signature verification." was appearing multiple times (once per NuGetPackageDownloader instance).

What changed?

  • Added IsDiagnostic() extension method - Returns true only for diagnostic or diag verbosity levels
  • Updated WorkloadManifestUpdater - Both error messages are now guarded by the _displayManifestUpdates flag
  • Updated command classes - WorkloadInstallCommand, WorkloadUpdateCommand, and WorkloadListCommand now use IsDiagnostic() instead of IsDetailedOrDiagnostic() when creating WorkloadManifestUpdater instances
  • Made signature verification message static - Changed _validationMessagesDisplayed flag to static in NuGetPackageDownloader to ensure the message appears only once globally
  • Updated tests - Modified existing tests and added new ones to verify the message suppression behavior

Verification:

✅ All 23 WorkloadManifestUpdater tests pass
✅ All 43 WorkloadInstall tests pass (1 pre-existing failure unrelated to this change)
✅ Code review completed with all feedback addressed
✅ CodeQL security scan passed
✅ Build succeeds

Files Modified:

  • src/Cli/dotnet/Extensions/CommonOptionsExtensions.cs - Added IsDiagnostic() method
  • src/Cli/dotnet/Commands/Workload/Install/WorkloadManifestUpdater.cs - Guarded error messages
  • src/Cli/dotnet/Commands/Workload/Install/WorkloadInstallCommand.cs - Changed to IsDiagnostic()
  • src/Cli/dotnet/Commands/Workload/Update/WorkloadUpdateCommand.cs - Changed to IsDiagnostic()
  • src/Cli/dotnet/Commands/Workload/List/WorkloadListCommand.cs - Changed to IsDiagnostic()
  • src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs - Made validation message flag static
  • test/dotnet.Tests/CommandTests/Workload/Install/GivenWorkloadManifestUpdater.cs - Updated tests
  • test/dotnet.Tests/CommandTests/Workload/Install/GivenDotnetWorkloadInstall.cs - Updated tests
Original prompt

This section details on the original issue you should resolve

<issue_title>Advertising manifest messages showing up during install</issue_title>
<issue_description>```
C:\test>dotnet workload install maui ios maccatalyst android --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json --source https://api.nuget.org/v3/index.json

Advertising manifest not updated. Manifest package for microsoft.net.sdk.maui doesn't exist.
Advertising manifest not updated. Manifest package for microsoft.net.workload.emscripten doesn't exist.
Advertising manifest not updated. Manifest package for microsoft.net.sdk.android doesn't exist.
Advertising manifest not updated. Manifest package for microsoft.net.workload.mono.toolchain doesn't exist.


We shouldn't be showing these messages at all. Also during testing admin installs, it looks like we're looking in the wrong place for the advertising manifests (according to Jacques):

C:\test>dotnet workload install maui ios maccatalyst android --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/6.0.4xx-sr3.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json --source https://api.nuget.org/v3/index.json

Workload(s) 'android ios maccatalyst maui' are already installed.
Skipping NuGet package signature verification.
Failed to update the advertising manifest microsoft.net.sdk.tvos: Failed to extract information from MSI: C:\Users\WDAGUtilityAccount\AppData\Local\Temp\d79c40da-6861-471c-9a26-6de5975949a0\data\Microsoft.NET.Sdk.tvOS.Manifest-6.0.400.15.4.440-x64.msi.
Failed to update the advertising manifest microsoft.net.sdk.macos: Failed to extract information from MSI: C:\Users\WDAGUtilityAccount\AppData\Local\Temp\c5339238-80b9-4907-b3a2-a49cca958a57\data\Microsoft.NET.Sdk.macOS.Manifest-6.0.400.12.3.440-x64.msi.
Failed to update the advertising manifest microsoft.net.sdk.maccatalyst: Failed to extract information from MSI: C:\Users\WDAGUtilityAccount\AppData\Local\Temp\cabd7fce-12a7-411a-ade1-ccf6e05d301d\data\Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.400.15.4.440-x64.msi.
Failed to update the advertising manifest microsoft.net.workload.mono.toolchain: Failed to extract information from MSI: C:\Users\WDAGUtilityAccount\AppData\Local\Temp\4d113a51-82c4-4772-b944-73723615af0e\data\Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.300.6.0.7-x64.msi.
Failed to update the advertising manifest microsoft.net.sdk.android: Failed to extract information from MSI: C:\Users\WDAGUtilityAccount\AppData\Local\Temp\943cb9c7-d6d6-4648-9589-f82993800dca\data\Microsoft.NET.Sdk.Android.Manifest-6.0.300.32.0.442-x64.msi.


<agent_instructions>We should suppress the advertising manifest messages during install unless verbosity is set to diag.</agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits November 4, 2025 21:55
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix advertising manifest messages during install Suppress advertising manifest messages unless verbosity is diagnostic Nov 4, 2025
Copilot AI requested a review from marcpopMSFT November 4, 2025 22:05
Copilot finished work on behalf of marcpopMSFT November 4, 2025 22:05
@marcpopMSFT
Copy link
Member

@copilot on unsigned .NET versions, we also have a message we include for each manifest which is more than we probably want. I think it's still worth saying it once. Can you reduce the number of times this message is sent to be only once?
Skipping NuGet package signature verification.

@marcpopMSFT
Copy link
Member

Testing done: The message only shows up in manifest mode. Confirmed that with this change, I no longer see it but if I do -v:diag, I will still get the messages as expected.

Changed _validationMessagesDisplayed flag from instance-level to static to ensure
"Skipping NuGet package signature verification." message appears only once across
all NuGetPackageDownloader instances during workload operations, rather than once
per instance.

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 13, 2025

@copilot on unsigned .NET versions, we also have a message we include for each manifest which is more than we probably want. I think it's still worth saying it once. Can you reduce the number of times...

Fixed in commit b564f6b. Changed the _validationMessagesDisplayed flag from instance-level to static, so the "Skipping NuGet package signature verification." message will only appear once globally across all NuGetPackageDownloader instances during a workload operation.

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.

2 participants