Skip to content

Commit 8334c6d

Browse files
committed
C#: Do not call nuget.exe on Apple Silicon
1 parent ae09499 commit 8334c6d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

csharp/autobuilder/Semmle.Autobuild.Shared/MsBuildRule.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ BuildScript GetNugetRestoreScript() =>
8282
Argument("/t:restore").
8383
QuoteArgument(projectOrSolution.FullPath);
8484

85-
if (nugetDownloaded)
85+
if (builder.Actions.IsRunningOnAppleSilicon())
86+
{
87+
// On Apple Silicon, only try package restore with `dotnet msbuild /t:restore`
88+
ret &= BuildScript.Try(msbuildRestoreCommand.Script);
89+
}
90+
else if (nugetDownloaded)
8691
{
8792
ret &= BuildScript.Try(nugetRestore | msbuildRestoreCommand.Script);
8893
}

0 commit comments

Comments
 (0)