Skip to content

Commit 3fb2191

Browse files
authored
[tests] Add --no-restore to dotnet new invocations for better performance. (#1040)
Calling `dotnet add nuget <package>` implicitly does a NuGet restore before returning. However, after we get the test set up using these commands we call `dotnet build` which _also_ does a NuGet restore. Improve performance by opting out of this initial restore and only doing the one at build time.
1 parent 0e43932 commit 3fb2191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/extended/TestAllIndividualPackages.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async Task TestPackage (string id, string version, string template)
107107
ReplaceInFile (activity_file, "public class MainActivity : Activity", "public class MainActivity : global::Android.App.Activity");
108108

109109
// Add the package
110-
await RunAndAssertSuccess ($"add package {id} --version {version}", case_dir);
110+
await RunAndAssertSuccess ($"add package {id} --version {version} --no-restore", case_dir);
111111

112112
// Build the project
113113
await RunAndAssertSuccess ($"build -c {configuration} -bl", case_dir, true);

0 commit comments

Comments
 (0)