From cd27bc5211a0158170f8bdaa44325ea53feb2369 Mon Sep 17 00:00:00 2001 From: maca88 Date: Sat, 30 Dec 2017 17:25:27 +0100 Subject: [PATCH] Fixed restore for test solutions --- .../TargetFramework/Fixture.cs | 14 -------------- build.cake | 9 +++++++++ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Source/AsyncGenerator.Tests/TargetFramework/Fixture.cs b/Source/AsyncGenerator.Tests/TargetFramework/Fixture.cs index 172b9bc5..87676a15 100644 --- a/Source/AsyncGenerator.Tests/TargetFramework/Fixture.cs +++ b/Source/AsyncGenerator.Tests/TargetFramework/Fixture.cs @@ -13,20 +13,6 @@ namespace AsyncGenerator.Tests.TargetFramework [TestFixture] public class Fixture : BaseFixture { - [OneTimeSetUp] - public void Restore() - { - var process = new Process(); - var startInfo = new ProcessStartInfo - { - WindowStyle = ProcessWindowStyle.Hidden, - FileName = "cmd.exe", - Arguments = $"/C dotnet restore {GetTestSolutionPath("MultiTargetFrameworks")}" - }; - process.StartInfo = startInfo; - process.Start(); - } - [Test] public Task TestSolution() { diff --git a/build.cake b/build.cake index 9f9d3b64..1679c3ac 100644 --- a/build.cake +++ b/build.cake @@ -47,6 +47,15 @@ Task("Restore-NuGet-Packages") { ConfigFile = "./Nuget.config" }); + var testSolutions = GetFiles("./Source/AsyncGenerator.TestProjects/*.sln"); + foreach(var testSolution in testSolutions) + { + Information("Restoring {0}", testSolution); + NuGetRestore(testSolution, new NuGetRestoreSettings + { + ConfigFile = "./Nuget.config" + }); + } }); Task("Build")