Skip to content

Commit 67963d7

Browse files
authored
Fix missing capabilities for MSTest.Analyzers.UnitTests (#5178)
1 parent e534513 commit 67963d7

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

Directory.Packages.props

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<PropertyGroup Label="Test dependencies">
3131
<MicrosoftCodeAnalysisAnalyzerTestingVersion>1.1.3-beta1.24423.1</MicrosoftCodeAnalysisAnalyzerTestingVersion>
3232
<MSTestVersion>3.9.0-preview.25153.3</MSTestVersion>
33+
<MicrosoftTestingPlatformVersion>1.7.0-preview.25126.1</MicrosoftTestingPlatformVersion>
3334
</PropertyGroup>
3435
<ItemGroup Label="Analyzers">
3536
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="$(MicrosoftCodeAnalysisBannedApiAnalyzersVersion)" />
@@ -71,6 +72,7 @@
7172
<PackageVersion Include="MSTest.Analyzers" Version="$(MSTestVersion)" />
7273
<PackageVersion Include="MSTest.TestAdapter" Version="$(MSTestVersion)" />
7374
<PackageVersion Include="MSTest.TestFramework" Version="$(MSTestVersion)" />
75+
<PackageVersion Include="Microsoft.Testing.Platform.MSBuild" Version="$(MicrosoftTestingPlatformVersion)" />
7476
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
7577

7678
<PackageVersion Include="Polly" Version="8.5.0" />

test/Directory.Build.targets

+4-8
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@
2626
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.HangDump\Microsoft.Testing.Extensions.HangDump.csproj" />
2727
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.Retry\Microsoft.Testing.Extensions.Retry.csproj" />
2828
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.TrxReport\Microsoft.Testing.Extensions.TrxReport.csproj" />
29+
<PackageReference Include="Microsoft.Testing.Platform.MSBuild" Condition="'$(UseInternalTestFramework)' == 'true' OR '$(UseMSTestFromSource)' == 'true'" />
2930
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" GeneratePathProperty="True" />
3031
</ItemGroup>
3132

33+
<!-- Import the capabilities for the Microsoft.Testing.Platform -->
34+
<Import Project="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\buildMultiTargeting\Microsoft.Testing.Platform.props" Condition=" '$(EnableMSTestRunner)' == 'true' OR '$(UseInternalTestFramework)' == 'true' " />
35+
3236
<ItemGroup Condition=" '$(EnableMSTestRunner)' == 'true' AND '$(UseInternalTestFramework)' != 'true' AND '$(UseMSTestFromSource)' != 'true' ">
3337
<PackageReference Include="MSTest.Analyzers" />
3438
<PackageReference Include="MSTest.TestFramework" />
@@ -60,12 +64,4 @@
6064
<ProjectReference Include="$(RepoRoot)test\Utilities\TestFramework.ForTestingMSTest\TestFramework.ForTestingMSTest.csproj" />
6165
</ItemGroup>
6266

63-
<ItemGroup Condition=" '$(UseInternalTestFramework)' == 'true' ">
64-
<ProjectCapability Include="TestContainer" />
65-
<ProjectCapability Include="TestingPlatformServer" />
66-
</ItemGroup>
67-
68-
<Import Project="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\buildMultiTargeting\Microsoft.Testing.Platform.props"
69-
Condition=" '$(UseInternalTestFramework)' == 'true' " />
70-
7167
</Project>

test/UnitTests/Microsoft.Testing.Platform.MSBuild.UnitTests/Microsoft.Testing.Platform.MSBuild.UnitTests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
<ItemGroup>
1616
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Platform.MSBuild\Microsoft.Testing.Platform.MSBuild.csproj" />
17+
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.MSBuild\Microsoft.Testing.Extensions.MSBuild.csproj" />
1718
</ItemGroup>
1819

1920
</Project>

0 commit comments

Comments
 (0)