Skip to content

Commit 809138b

Browse files
authored
Move xunit templates back to xunit 2 (#50933)
1 parent dfe8030 commit 809138b

File tree

6 files changed

+12
-66
lines changed

6 files changed

+12
-66
lines changed

template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,19 @@
66
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.TestProject1</RootNamespace>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>
9-
<OutputType>Exe</OutputType>
109
<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
1110
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
12-
13-
<!-- To enable Microsoft.Testing.Platform, uncomment the following line. -->
14-
<!-- <UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner> -->
15-
<!-- Note: to use Microsoft.Testing.Platform correctly with dotnet test: -->
16-
<!-- 1. You must create or update your existing global.json to specify the test runner to be Microsoft.Testing.Platform -->
17-
<!-- 2. You must use .NET 10 SDK or later -->
18-
<!-- For more information, see https://aka.ms/dotnet-test/mtp and https://xunit.net/docs/getting-started/v3/microsoft-testing-platform -->
19-
<!-- To enable code coverage with Microsoft.Testing.Platform, add a package reference to Microsoft.Testing.Extensions.CodeCoverage -->
20-
<!-- https://learn.microsoft.comdotnet/core/testing/microsoft-testing-platform-extensions-code-coverage -->
21-
22-
<IsTestingPlatformApplication Condition="'$(UseMicrosoftTestingPlatformRunner)'!='true'">false</IsTestingPlatformApplication>
2311
</PropertyGroup>
2412

2513
<ItemGroup>
14+
<PackageReference Include="coverlet.collector" Version="6.0.4" />
2615
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
27-
<PackageReference Include="xunit.v3" Version="3.2.0-pre.10" />
28-
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.3" />
29-
</ItemGroup>
30-
31-
<ItemGroup>
32-
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
16+
<PackageReference Include="xunit" Version="2.9.3" />
17+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
3318
</ItemGroup>
3419

3520
<ItemGroup>
3621
<Using Include="Xunit" />
3722
</ItemGroup>
3823

39-
</Project>
24+
</Project>

template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/xunit.runner.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Company.TestProject1.fsproj

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,19 @@
44
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">net10.0</TargetFramework>
55
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
66
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.TestProject1</RootNamespace>
7-
<OutputType>Exe</OutputType>
87
<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
98
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
10-
11-
<!-- To enable Microsoft.Testing.Platform, uncomment the following line. -->
12-
<!-- <UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner> -->
13-
<!-- Note: to use Microsoft.Testing.Platform correctly with dotnet test: -->
14-
<!-- 1. You must create or update your existing global.json to specify the test runner to be Microsoft.Testing.Platform -->
15-
<!-- 2. You must use .NET 10 SDK or later -->
16-
<!-- For more information, see https://aka.ms/dotnet-test/mtp and https://xunit.net/docs/getting-started/v3/microsoft-testing-platform -->
17-
<!-- To enable code coverage with Microsoft.Testing.Platform, add a package reference to Microsoft.Testing.Extensions.CodeCoverage -->
18-
<!-- https://learn.microsoft.comdotnet/core/testing/microsoft-testing-platform-extensions-code-coverage -->
19-
20-
<IsTestingPlatformApplication Condition="'$(UseMicrosoftTestingPlatformRunner)'!='true'">false</IsTestingPlatformApplication>
219
</PropertyGroup>
2210

2311
<ItemGroup>
2412
<Compile Include="Tests.fs" />
2513
</ItemGroup>
2614

2715
<ItemGroup>
16+
<PackageReference Include="coverlet.collector" Version="6.0.4" />
2817
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
29-
<PackageReference Include="xunit.v3" Version="3.2.0-pre.10" />
30-
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.3" />
31-
</ItemGroup>
32-
33-
<ItemGroup>
34-
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
18+
<PackageReference Include="xunit" Version="2.9.3" />
19+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
3520
</ItemGroup>
3621

37-
</Project>
22+
</Project>

template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/xunit.runner.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/Company.TestProject1.vbproj

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,15 @@
44
<RootNamespace>Company.TestProject1</RootNamespace>
55
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">net10.0</TargetFramework>
66
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
7-
<OutputType>Exe</OutputType>
87
<IsPackable Condition="'$(EnablePack)' == 'true'">true</IsPackable>
98
<IsPackable Condition="'$(EnablePack)' != 'true'">false</IsPackable>
10-
11-
<!-- To enable Microsoft.Testing.Platform, uncomment the following line. -->
12-
<!-- <UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner> -->
13-
<!-- Note: to use Microsoft.Testing.Platform correctly with dotnet test: -->
14-
<!-- 1. You must create or update your existing global.json to specify the test runner to be Microsoft.Testing.Platform -->
15-
<!-- 2. You must use .NET 10 SDK or later -->
16-
<!-- For more information, see https://aka.ms/dotnet-test/mtp and https://xunit.net/docs/getting-started/v3/microsoft-testing-platform -->
17-
<!-- To enable code coverage with Microsoft.Testing.Platform, add a package reference to Microsoft.Testing.Extensions.CodeCoverage -->
18-
<!-- https://learn.microsoft.comdotnet/core/testing/microsoft-testing-platform-extensions-code-coverage -->
19-
20-
<IsTestingPlatformApplication Condition="'$(UseMicrosoftTestingPlatformRunner)'!='true'">false</IsTestingPlatformApplication>
219
</PropertyGroup>
2210

2311
<ItemGroup>
12+
<PackageReference Include="coverlet.collector" Version="6.0.4" />
2413
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
25-
<PackageReference Include="xunit.v3" Version="3.2.0-pre.10" />
26-
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.3" />
27-
</ItemGroup>
28-
29-
<ItemGroup>
30-
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
14+
<PackageReference Include="xunit" Version="2.9.3" />
15+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
3116
</ItemGroup>
3217

33-
</Project>
18+
</Project>

template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/xunit.runner.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)