Skip to content

Commit

Permalink
Migrate from VSTest to MTP
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Feb 8, 2025
1 parent 8f4e885 commit af422b7
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,9 +16,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 2 additions & 3 deletions src/Bicep.Cli.UnitTests/Bicep.Cli.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -10,9 +11,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,9 +18,7 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="coverlet.collector" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
5 changes: 2 additions & 3 deletions src/Bicep.Core.Samples/Bicep.Core.Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,9 +16,7 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="coverlet.collector" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
5 changes: 2 additions & 3 deletions src/Bicep.Core.UnitTests/Bicep.Core.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="JsonDiffPatch.Net" Version="2.3.0" />
<PackageReference Include="DiffPlex" Version="1.7.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="Newtonsoft.Json.Schema" Version="4.0.1" />
<PackageReference Include="coverlet.collector" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,9 +12,7 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="coverlet.collector" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="coverlet.collector" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
5 changes: 2 additions & 3 deletions src/Bicep.IO.UnitTests/Bicep.IO.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.3" />
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="21.3.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,11 +12,9 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.12.19" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="OmniSharp.Extensions.LanguageClient" Version="0.19.9" />
<PackageReference Include="coverlet.collector" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -12,10 +13,8 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="OmniSharp.Extensions.LanguageClient" Version="0.19.9" />
<PackageReference Include="coverlet.collector" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -10,9 +11,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Grpc.AspNetCore.Server" Version="2.67.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="coverlet.collector" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
<PackageReference Include="coverlet.collector" Version="6.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
9 changes: 9 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
<RuntimeIdentifiers Condition=" $(UsingMicrosoftNETSdkBlazorWebAssembly) != 'true' ">win-x64;linux-x64;linux-musl-x64;osx-x64;win-arm64;linux-arm64;osx-arm64</RuntimeIdentifiers>
</PropertyGroup>

<PropertyGroup Label="Testing">
<MSTestVersion>3.7.3</MSTestVersion>
<EnableMSTestRunner>true</EnableMSTestRunner>

<!-- More info about dotnet test integration https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test -->
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
</PropertyGroup>

<!-- set default framework - each project can still override -->
<PropertyGroup Condition=" '$(MSBuildProjectExtension)' == '.csproj' ">
<TargetFramework>net8.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -24,14 +25,12 @@
</PackageReference>
<PackageReference Include="Microsoft.IO.Redist" Version="6.1.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Microsoft.Test.Apex.VisualStudio" Version="17.11.35222.181" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="17.12.18" />
<PackageReference Include="Microsoft.VisualStudio.Editor" Version="17.12.215" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Framework" Version="17.12.40391" />
<PackageReference Include="Microsoft.VisualStudio.Utilities" Version="17.12.40391" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</PackageReference>
<PackageReference Include="Microsoft.IO.Redist" Version="6.1.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.12.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Microsoft.Test.Apex.VisualStudio" Version="17.11.35222.181" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="17.12.18" />
<PackageReference Include="Microsoft.VisualStudio.Editor" Version="17.12.215" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
Expand All @@ -16,8 +17,7 @@
<PackageReference Include="Microsoft.VisualStudio.LanguageServer.Protocol" Version="17.2.8" />
<PackageReference Include="Microsoft.VisualStudio.Utilities" Version="17.12.40391" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.7.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="MSTest" Version="$(MSTestVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit af422b7

Please sign in to comment.