Skip to content

Conversation

DanielMicrosoft
Copy link
Contributor

Description

This is a temp fix for the issue of mono no longer being bundled with Ubuntu (as of version 24) on Microsoft hosted containers.

A longer term fix will follow, using this guidance: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/nuget-command-v2?view=azure-pipelines&tabs=windows#support-for-newer-ubuntu-hosted-images

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@YanaXu YanaXu marked this pull request as ready for review September 24, 2025 05:27
@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 05:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a temporary workaround for mono installation issues in smoke tests on Ubuntu 24+ hosted containers, where mono is no longer bundled by default but is required for NuGet.exe functionality.

  • Adds conditional mono installation for Linux agents in Azure DevOps pipeline
  • Uses bash task to check for mono availability and installs mono-complete package if missing
  • Ensures NuGet operations continue to work in smoke test pipeline

Comment on lines +89 to +92
command -v mono >/dev/null || {
echo "Mono not found, installing...";
sudo apt-get update -qq && sudo apt-get install -y mono-complete;
}
Copy link
Preview

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The compound command uses semicolons which can lead to unexpected behavior if any command fails. Consider using proper error handling with separate conditional blocks or adding set -e to ensure the script fails fast on any error.

Copilot uses AI. Check for mistakes.

@YanaXu YanaXu merged commit d17e217 into main Sep 24, 2025
10 of 22 checks passed
@YanaXu YanaXu deleted the danielMS/add-mono-for-linux-steps branch September 24, 2025 05:29
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