Update MSTest dependencies and manage package versions centrally

Replaced deprecated MSTest.TestAdapter with new MSTest packages and added necessary analyzer configurations. Also included version management for the Microsoft.NET.Test.Sdk and various MSTest packages in Directory.Packages.props to ensure uniformity across the project.

Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
This commit is contained in:
Ivandro Jao 2024-09-27 22:55:29 +01:00
parent 2e2fa383c5
commit ea811cacf3
2 changed files with 12 additions and 1 deletions

View File

@ -3,6 +3,10 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="MSTest" Version="3.6.0" />
<PackageVersion Include="MSTest.Analyzers" Version="3.6.0" />
<PackageVersion Include="MSTest.Sdk" Version="3.6.0" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.6.0" /> <PackageVersion Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageVersion Include="MSTest.TestFramework" Version="3.6.0" /> <PackageVersion Include="MSTest.TestFramework" Version="3.6.0" />
<PackageVersion Include="System.Drawing.Common" Version="8.0.8" /> <PackageVersion Include="System.Drawing.Common" Version="8.0.8" />

View File

@ -81,7 +81,14 @@
<ProjectReference Include="..\ui\SubtitleEdit.csproj" /> <ProjectReference Include="..\ui\SubtitleEdit.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="MSTest.TestAdapter" /> <!-- <PackageReference Include="MSTest.TestAdapter" />-->
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest" />
<PackageReference Include="MSTest.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MSTest.Sdk" />
<PackageReference Include="MSTest.TestFramework" /> <PackageReference Include="MSTest.TestFramework" />
<PackageReference Include="NHunspell" /> <PackageReference Include="NHunspell" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" /> <PackageReference Include="System.Runtime.CompilerServices.Unsafe" />