Skip to content

Commit 91b85f3

Browse files
Merge branch 'dev/mabdullah/add-instance-id-to-dotnet-test' of https://github.com/microsoft/testfx into dev/mabdullah/add-instance-id-to-dotnet-test
2 parents a9d2f2f + 78b2033 commit 91b85f3

File tree

25 files changed

+138
-46
lines changed

25 files changed

+138
-46
lines changed

NonWindowsTests.slnf

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"solution": {
3+
"path": "TestFx.sln",
4+
"projects": [
5+
"test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj",
6+
"test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSTest.Acceptance.IntegrationTests.csproj",
7+
"test/UnitTests/Microsoft.Testing.Extensions.UnitTests/Microsoft.Testing.Extensions.UnitTests.csproj",
8+
"test/UnitTests/Microsoft.Testing.Extensions.VSTestBridge.UnitTests/Microsoft.Testing.Extensions.VSTestBridge.UnitTests.csproj",
9+
"test/UnitTests/Microsoft.Testing.Platform.UnitTests/Microsoft.Testing.Platform.UnitTests.csproj",
10+
"test/UnitTests/Microsoft.Testing.Platform.MSBuild.UnitTests/Microsoft.Testing.Platform.MSBuild.UnitTests.csproj",
11+
"test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj"
12+
]
13+
}
14+
}

azure-pipelines.yml

+25-18
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,17 @@ stages:
9494
displayName: Build
9595

9696
- ${{ if eq(parameters.SkipTests, False) }}:
97-
# -ci is allowing to import some environment variables and some required configurations
98-
# -nobl avoids overwriting build binlog with binlog from tests
99-
- script: Test.cmd
100-
-configuration $(_BuildConfig)
101-
-ci
102-
-nobl
97+
98+
# Because the build step is using -ci flag, restore is done in a local .packages directory.
99+
# We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them.
100+
# Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set.
101+
- script: $(Build.SourcesDirectory)/.dotnet/dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\TestStep.binlog
103102
name: Test
104103
displayName: Test
104+
env:
105+
DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet
106+
NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages
107+
105108

106109
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
107110
# through the console or trx
@@ -157,13 +160,15 @@ stages:
157160
displayName: Build
158161

159162
- ${{ if eq(parameters.SkipTests, False) }}:
160-
# --ci is allowing to import some environment variables and some required configurations
161-
# --nobl avoids overwriting build binlog with binlog from tests
162-
- script: |
163-
chmod +x ./test.sh
164-
./test.sh --configuration $(_BuildConfig) --ci --test --integrationTest --nobl
163+
# Because the build step is using -ci flag, restore is done in a local .packages directory.
164+
# We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them.
165+
# Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set.
166+
- script: $(Build.SourcesDirectory)/.dotnet/dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\TestStep.binlog
165167
name: Test
166-
displayName: Tests
168+
displayName: Test
169+
env:
170+
DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet
171+
NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages
167172

168173
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
169174
# through the console or trx
@@ -212,13 +217,15 @@ stages:
212217
displayName: Build
213218

214219
- ${{ if eq(parameters.SkipTests, False) }}:
215-
# --ci is allowing to import some environment variables and some required configurations
216-
# --nobl avoids overwriting build binlog with binlog from tests
217-
- script: |
218-
chmod +x ./test.sh
219-
./test.sh --configuration $(_BuildConfig) --ci --test --integrationTest --nobl
220+
# Because the build step is using -ci flag, restore is done in a local .packages directory.
221+
# We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them.
222+
# Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set.
223+
- script: $(Build.SourcesDirectory)/.dotnet/dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\TestStep.binlog
220224
name: Test
221-
displayName: Tests
225+
displayName: Test
226+
env:
227+
DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet
228+
NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages
222229

223230
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
224231
# through the console or trx

dotnet.config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[dotnet.test:runner]
2+
name= "Microsoft.Testing.Platform"

global.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"tools": {
3-
"dotnet": "10.0.100-preview.3.25125.5",
3+
"dotnet": "10.0.100-preview.3.25166.18",
44
"runtimes": {
55
"dotnet": [
66
"3.1.32",
@@ -23,7 +23,7 @@
2323
}
2424
},
2525
"sdk": {
26-
"version": "10.0.100-preview.3.25125.5",
26+
"version": "10.0.100-preview.3.25166.18",
2727
"allowPrerelease": true,
2828
"rollForward": "latestFeature"
2929
},

samples/Playground/Playground.csproj

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<Nullable>enable</Nullable>
77
<GenerateProgramFile>false</GenerateProgramFile>
88
<NoWarn>$(NoWarn);NETSDK1023</NoWarn>
9+
10+
<IsTestingPlatformApplication>true</IsTestingPlatformApplication>
911
</PropertyGroup>
1012

1113
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">

samples/Playground/Tests.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public class TestClass
1515
[TestMethod]
1616
[DynamicData(nameof(Data))]
1717
public void Test3(int a, int b)
18-
=> throw new Exception("aaaa");
18+
{
19+
}
1920

2021
public static IEnumerable<(int A, int B)> Data
2122
{

test/Directory.Build.targets

+12
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@
1717
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --hangdump --hangdump-timeout 15m</TestRunnerAdditionalArguments>
1818
<TestRunnerAdditionalArguments Condition=" '$(EnableCodeCoverage)' == 'True' ">$(TestRunnerAdditionalArguments) --coverage --coverage-settings $(RepoRoot)test/coverage.config --coverage-output $(ModuleName).coverage</TestRunnerAdditionalArguments>
1919
<!-- /Arcade runner settings -->
20+
21+
<!-- dotnet test runner settings - most duplicate from Arcade to have parity -->
22+
<_TestArchitecture>$(PlatformTarget)</_TestArchitecture>
23+
<_TestArchitecture Condition="'$(PlatformTarget)' == '' or '$(PlatformTarget)' == 'AnyCpu'">x64</_TestArchitecture>
24+
25+
<_ResultFileNameNoExt>$(MSBuildProjectName)_$(TargetFramework)_$(_TestArchitecture)</_ResultFileNameNoExt>
26+
<ResultsTrxPath>$(ArtifactsTestResultsDir)$(_ResultFileNameNoExt).trx</ResultsTrxPath>
27+
<_TestResultTrxFileName>$([System.IO.Path]::GetFileName('$(ResultsTrxPath)'))</_TestResultTrxFileName>
28+
<_TestResultDirectory>$([System.IO.Path]::GetDirectoryName('$(ResultsTrxPath)'))</_TestResultDirectory>
29+
<TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --report-trx --report-trx-filename "$(_TestResultTrxFileName)" --results-directory "$(_TestResultDirectory)" $(TestRunnerAdditionalArguments)</TestingPlatformCommandLineArguments>
30+
<!-- /dotnet test runner settings -->
2031
</PropertyGroup>
2132

2233
<ItemGroup Condition=" '$(EnableMSTestRunner)' == 'true' OR '$(UseInternalTestFramework)' == 'true' ">
@@ -32,6 +43,7 @@
3243

3344
<!-- Import the capabilities for the Microsoft.Testing.Platform -->
3445
<Import Project="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\buildMultiTargeting\Microsoft.Testing.Platform.props" Condition=" '$(EnableMSTestRunner)' == 'true' OR '$(UseInternalTestFramework)' == 'true' " />
46+
<Import Project="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\buildMultiTargeting\Microsoft.Testing.Platform.targets" Condition=" '$(EnableMSTestRunner)' == 'true' OR '$(UseInternalTestFramework)' == 'true' " />
3547

3648
<ItemGroup Condition=" '$(EnableMSTestRunner)' == 'true' AND '$(UseInternalTestFramework)' != 'true' AND '$(UseMSTestFromSource)' != 'true' ">
3749
<PackageReference Include="MSTest.Analyzers" />

test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DotnetTestCliTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public async Task DotnetTest_Should_Execute_Tests(string tfm, BuildConfiguration
2525
.PatchCodeWithReplace("$OutputType$", string.Empty)
2626
.PatchCodeWithReplace("$Extra$", string.Empty));
2727

28-
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test -m:1 -nodeReuse:false {generator.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path);
28+
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test -m:1 -nodeReuse:false {generator.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path, workingDirectory: generator.TargetAssetPath);
2929

3030
// There is whitespace difference in output in parent and public repo that depends on the version of the dotnet SDK used.
3131
compilationResult.AssertOutputMatchesRegex(@"Passed!\s+-\s+Failed:\s+0,\s+Passed:\s+1,\s+Skipped:\s+0,\s+Total:\s+1");

test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSBuildRunnerTests.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public async Task MSBuildTestTarget_SingleAndMultiTfm_Should_Run_Solution_Tests(
6666
// Build the solution
6767
DotnetMuxerResult restoreResult = await DotnetCli.RunAsync($"restore -m:1 -nodeReuse:false {solution.SolutionFile} --configfile {nugetFile}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path);
6868
restoreResult.AssertOutputDoesNotContain("An approximate best match of");
69-
DotnetMuxerResult testResult = await DotnetCli.RunAsync($"{command} -m:1 -nodeReuse:false {solution.SolutionFile}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path);
69+
70+
DotnetMuxerResult testResult = await DotnetCli.RunAsync($"{command} -m:1 -nodeReuse:false {solution.SolutionFile}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path, workingDirectory: generator.TargetAssetPath);
7071

7172
if (isMultiTfm)
7273
{

test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PublishAotNonNativeTests.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public async Task RunTests_ThatEnablePublishAOT_ButDontBuildToNative()
2424
.PatchCodeWithReplace("$TargetFramework$", $"<TargetFramework>{TargetFrameworks.NetCurrent}</TargetFramework>")
2525
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
2626

27-
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test -c Debug {generator.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path, failIfReturnValueIsNotZero: false);
27+
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test -c Debug {generator.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path, workingDirectory: generator.TargetAssetPath, failIfReturnValueIsNotZero: false);
2828

2929
// In the real-world issue, access to path C:\Program Files\dotnet\ is denied, but we run this from a local .dotnet folder, where we have write access.
3030
// So instead of relying on the test run failing because of AccessDenied, we check the output, and see where TestResults were placed.
@@ -68,6 +68,10 @@ we end up with a -dev or -ci version which will lose resolution over -preview de
6868
</ItemGroup>
6969
</Project>
7070
71+
#file dotnet.config
72+
[dotnet.test:runner]
73+
name= "VSTest"
74+
7175
#file UnitTest1.cs
7276
7377
using Microsoft.VisualStudio.TestTools.UnitTesting;

test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,12 @@ public async Task UnsupportedRunSettingsEntriesAreFlagged_Localization(string? t
7171
switch (expectedLocale)
7272
{
7373
case "fr-FR":
74-
testHostResult.AssertOutputContains("Les loggers Runsettings ne sont pas pris en charge par Microsoft.Testing.Platform et seront ignorés");
75-
testHostResult.AssertOutputContains("Les datacollecteurs Runsettings ne sont pas pris en charge par Microsoft.Testing.Platform et seront ignorés");
74+
// Using regex for the "é" of ignorés as something with encoding doesn't work properly.
75+
// The é shows correctly when invoking with Arcade, but not with dotnet test.
76+
// This is probably because Arcade infra uses Exec MSBuild task, which seems to be having extra logic around handling encoding.
77+
// See https://github.com/dotnet/msbuild/blob/bcc2dc6a6509ffb63f1253a9bbbaaa233bd53a50/src/Tasks/Exec.cs
78+
testHostResult.AssertOutputMatchesRegex(@"Les loggers Runsettings ne sont pas pris en charge par Microsoft\.Testing\.Platform et seront ignor.*?s");
79+
testHostResult.AssertOutputMatchesRegex(@"Les datacollecteurs Runsettings ne sont pas pris en charge par Microsoft\.Testing\.Platform et seront ignor.*?s");
7680
break;
7781
case "it-IT":
7882
testHostResult.AssertOutputContains("I logger Runsettings non sono supportati da Microsoft.Testing.Platform e verranno ignorati");

test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SdkTests.cs

+17-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ we end up with a -dev or -ci version which will lose resolution over -preview de
3333
3434
</Project>
3535
36+
#file dotnet.config
37+
[dotnet.test:runner]
38+
name= "VSTest"
39+
3640
#file UnitTest1.cs
3741
using Microsoft.VisualStudio.TestTools.UnitTesting;
3842
@@ -60,7 +64,7 @@ public async Task RunTests_With_VSTest(string multiTfm, BuildConfiguration build
6064
.PatchCodeWithReplace("$TargetFramework$", multiTfm)
6165
.PatchCodeWithReplace("$ExtraProperties$", "<UseVSTest>true</UseVSTest>"));
6266

63-
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test -c {buildConfiguration} {testAsset.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path);
67+
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test -c {buildConfiguration} {testAsset.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path, workingDirectory: testAsset.TargetAssetPath);
6468
Assert.AreEqual(0, compilationResult.ExitCode);
6569

6670
compilationResult.AssertOutputMatchesRegex(@"Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: .* [m]?s - MSTestSdk.dll \(net9\.0\)");
@@ -87,7 +91,7 @@ public async Task RunTests_With_MSTestRunner_DotnetTest(string multiTfm, BuildCo
8791
.PatchCodeWithReplace("$TargetFramework$", multiTfm)
8892
.PatchCodeWithReplace("$ExtraProperties$", string.Empty));
8993

90-
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test -c {buildConfiguration} {testAsset.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path);
94+
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test -c {buildConfiguration} {testAsset.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path, workingDirectory: testAsset.TargetAssetPath);
9195
Assert.AreEqual(0, compilationResult.ExitCode);
9296

9397
compilationResult.AssertOutputMatchesRegex(@"Tests succeeded: .* \[net9\.0|x64\]");
@@ -355,6 +359,7 @@ public async Task EnablePlaywrightProperty_WhenUsingVSTest_AllowsToRunPlaywright
355359
DotnetMuxerResult dotnetTestResult = await DotnetCli.RunAsync(
356360
$"test {exeOrDllName}",
357361
AcceptanceFixture.NuGetGlobalPackagesFolder.Path,
362+
workingDirectory: AssetFixture.PlaywrightProjectPath,
358363
failIfReturnValueIsNotZero: false,
359364
warnAsError: false,
360365
suppressPreviewDotNetMessage: false);
@@ -398,6 +403,7 @@ public async Task EnableAspireProperty_WhenUsingVSTest_AllowsToRunAspireTests()
398403
DotnetMuxerResult dotnetTestResult = await DotnetCli.RunAsync(
399404
$"test {exeOrDllName}",
400405
AcceptanceFixture.NuGetGlobalPackagesFolder.Path,
406+
workingDirectory: AssetFixture.AspireProjectPath,
401407
warnAsError: false,
402408
suppressPreviewDotNetMessage: false);
403409
Assert.AreEqual(0, dotnetTestResult.ExitCode);
@@ -416,7 +422,7 @@ public async Task SettingIsTestApplicationToFalseReducesAddedExtensionsAndMakesP
416422
.PatchCodeWithReplace("$TargetFramework$", TargetFrameworks.NetCurrent)
417423
.PatchCodeWithReplace("$ExtraProperties$", "<IsTestApplication>false</IsTestApplication>"));
418424

419-
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test {testAsset.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path);
425+
DotnetMuxerResult compilationResult = await DotnetCli.RunAsync($"test {testAsset.TargetAssetPath}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path, workingDirectory: testAsset.TargetAssetPath);
420426

421427
Assert.AreEqual(0, compilationResult.ExitCode);
422428

@@ -461,6 +467,10 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture.
461467
</ItemGroup>
462468
</Project>
463469
470+
#file dotnet.config
471+
[dotnet.test:runner]
472+
name= "VSTest"
473+
464474
#file UnitTest1.cs
465475
namespace AspireProject;
466476
@@ -523,6 +533,10 @@ public async Task HomepageHasPlaywrightInTitleAndGetStartedLinkLinkingToTheIntro
523533
await Expect(Page).ToHaveURLAsync(new Regex(".*intro"));
524534
}
525535
}
536+
537+
#file dotnet.config
538+
[dotnet.test:runner]
539+
name= "VSTest"
526540
""";
527541

528542
public string AspireProjectPath => GetAssetPath(AspireProjectName);

test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
namespace MSTest.Acceptance.IntegrationTests;
99

1010
[TestClass]
11+
[Ignore("These tests are so flaky, which could be related (at least partially) to https://github.com/microsoft/testfx/issues/5165")]
1112
public class TimeoutTests : AcceptanceTestBase<TimeoutTests.TestAssetFixture>
1213
{
1314
private static readonly Dictionary<string, (string MethodFullName, string Prefix, string EnvVarSuffix, string RunSettingsEntryName)> InfoByKind = new()

test/IntegrationTests/MSTest.IntegrationTests/OutputTests.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ public class OutputTests : CLITestBase
1414
{
1515
private const string TestAssetName = "OutputTestProject";
1616

17-
#if DEBUG
18-
public async Task OutputIsNotMixedWhenTestsRunInParallel() => await ValidateOutputForClassAsync("UnitTest1");
19-
#endif
17+
#pragma warning disable IDE0051 // Remove unused private members - test is failing in CI.
18+
private async Task OutputIsNotMixedWhenTestsRunInParallel() => await ValidateOutputForClassAsync("UnitTest1");
2019

21-
public async Task OutputIsNotMixedWhenAsyncTestsRunInParallel() => await ValidateOutputForClassAsync("UnitTest2");
20+
private async Task OutputIsNotMixedWhenAsyncTestsRunInParallel() => await ValidateOutputForClassAsync("UnitTest2");
21+
#pragma warning restore IDE0051 // Remove unused private members
2222

2323
private static async Task ValidateOutputForClassAsync(string className)
2424
{

test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceTestBase.cs

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public void TestMethod1()
4242
{
4343
}
4444
}
45+
46+
#file dotnet.config
47+
[dotnet.test:runner]
48+
name= "VSTest"
4549
""";
4650

4751
static AcceptanceTestBase()

test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MSBuildTests.Solution.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public async Task MSBuildTests_UseMSBuildTestInfrastructure_Should_Run_Solution_
4242
string solutionFolder = Path.Combine(tempDirectory.Path, "Solution");
4343
VSSolution solution = new(solutionFolder, "MSTestSolution");
4444
string nugetFile = solution.AddOrUpdateFileContent("Nuget.config", nugetConfigContent);
45+
solution.AddOrUpdateFileContent("dotnet.config", """
46+
[dotnet.test:runner]
47+
name= "VSTest"
48+
""");
4549
for (int i = 0; i < 3; i++)
4650
{
4751
CSharpProject project = solution.CreateCSharpProject($"TestProject{i}", isMultiTfm ? singleTfmOrMultiTfm.Split(';') : [singleTfmOrMultiTfm]);
@@ -55,7 +59,7 @@ public async Task MSBuildTests_UseMSBuildTestInfrastructure_Should_Run_Solution_
5559
// Build the solution
5660
DotnetMuxerResult restoreResult = await DotnetCli.RunAsync($"restore -nodeReuse:false {solution.SolutionFile} --configfile {nugetFile}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path);
5761
restoreResult.AssertOutputDoesNotContain("An approximate best match of");
58-
DotnetMuxerResult testResult = await DotnetCli.RunAsync($"{command} -nodeReuse:false {solution.SolutionFile}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path);
62+
DotnetMuxerResult testResult = await DotnetCli.RunAsync($"{command} -nodeReuse:false {solution.SolutionFile}", AcceptanceFixture.NuGetGlobalPackagesFolder.Path, workingDirectory: solution.FolderPath);
5963

6064
if (isMultiTfm)
6165
{

0 commit comments

Comments
 (0)