Skip to content

Commit c677a16

Browse files
[xaprepare] pass WorkingDirectory to dotnet workload install (#5985)
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4825895&view=logs&j=afc75dd9-ea98-591e-f4f4-0b6212ccdfde&t=a18fc855-de22-5374-28de-d604f6803bd2&s=af72edbe-9d58-52b1-91f1-857d7e391cf0 In commit 0150bbb, I missed that the macOS Designer tests phases fail with: Workload installation failed: One or more errors occurred. (microsoft.net.runtime.runtimeconfigparser.task::6.0.0-preview.6.21274.1 is not found in NuGet feeds https://api.nuget.org/v3/index.json",) I believe the command isn't finding the `NuGet.config` file in the root of the xamarin-android repo, and so we're missing this source: <add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" /> We need to set the `WorkingDirectory` of the process, so it finds the appropriate `NuGet.config` file. I would use the `--configfile` or `--add-source` switch instead, but these switches are not implemented yet for the `dotnet workload install` command.
1 parent 0384787 commit c677a16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-tools/xaprepare/xaprepare/Steps/Step_InstallDotNetPreview.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected override async Task<bool> Execute (Context context)
103103
}
104104

105105
// Install the microsoft-net-runtime-android workload
106-
if (!Utilities.RunCommand (dotnetTool, new [] { "workload", "install", "microsoft-net-runtime-android", "--skip-manifest-update", "--verbosity", "diag" })) {
106+
if (!Utilities.RunCommand (dotnetTool, BuildPaths.XamarinAndroidSourceRoot, ignoreEmptyArguments: false, new [] { "workload", "install", "microsoft-net-runtime-android", "--skip-manifest-update", "--verbosity", "diag" })) {
107107
Log.ErrorLine ($"dotnet workload install failed.");
108108
return false;
109109
}

0 commit comments

Comments
 (0)