Skip to content

C#: Only use nuget.exe on Windows or machines with Mono.#21993

Draft
michaelnebel wants to merge 6 commits into
github:mainfrom
michaelnebel:csharp/dropmono
Draft

C#: Only use nuget.exe on Windows or machines with Mono.#21993
michaelnebel wants to merge 6 commits into
github:mainfrom
michaelnebel:csharp/dropmono

Conversation

@michaelnebel

@michaelnebel michaelnebel commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

As mono is being deprecated (phased out) on the MacOS and Linux runners, we need to adjust the dependency manager implementation to only attempt to use nuget.exe on Windows or machines where mono is installed as nuget.exe can't be run natively on Linux or MacOS (it requires mono).

@github-actions github-actions Bot added the C# label Jun 17, 2026
@michaelnebel michaelnebel changed the title C#: Mono is no longer supported. C#: Use use nuget.exe on Windows or machines with Mono. Jun 17, 2026
@michaelnebel michaelnebel changed the title C#: Use use nuget.exe on Windows or machines with Mono. C#: Only use nuget.exe on Windows or machines with Mono. Jun 17, 2026
Comment on lines +115 to +118
catch (Exception e)
{
logger.LogError($"Failed to add default package source to {nugetConfigPath}: {e}");
}
Comment on lines +143 to +146
catch (Exception exc)
{
logger.LogInfo($"Download of nuget.exe failed: {exc.Message}");
}
Comment on lines +269 to +273
catch (Exception e)
{
logger.LogWarning($"Failed to check if default package source is added: {e}");
return true;
}
Comment on lines +337 to +340
catch (Exception exc)
{
logger.LogError($"Failed to restore original nuget.config file: {exc}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants