Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
78dec7d
Migrate test infrastructure from xUnit v2 to xUnit v3
Copilot Jul 2, 2026
3d22738
Fix xUnit v3 migration: IAsyncLifetime ValueTask, type conflicts, mis…
Copilot Jul 2, 2026
de66fb7
Fix XunitLoggerProvider v2/v3 ITestOutputHelper type mismatch with ad…
Copilot Jul 2, 2026
d3b5748
Remove reference to non-existent test/TestUtilities/TestUtilities.csp…
Copilot Jul 2, 2026
a2fa86f
Fix IDE0011, IDE0055, xUnit1006, CA1822 warnings treated as errors in CI
Copilot Jul 2, 2026
314c565
Fix IDE0032 and CA1816 warnings in ProjectTemplates Infrastructure
Copilot Jul 2, 2026
3b44bb1
Fix CS8602 nullable dereference warnings on Record.Exception() results
Copilot Jul 2, 2026
e5f259e
Fix NU1010 Windows build errors by adding empty-TF fallback for AspNe…
Copilot Jul 2, 2026
fff9efa
Address review feedback: ConditionalNet472 pattern, Assert.SkipUnless…
Copilot Jul 2, 2026
17f28af
Fix S4144: deduplicate FunctionInvocation_RequireSpecific by delegati…
Copilot Jul 3, 2026
df4b7c5
Address review feedback: fix UseVSTestRunner conflict, move Condition…
Copilot Jul 3, 2026
77d93e4
Restore xUnit1051 suppression with explanatory comment
Copilot Jul 3, 2026
bf1d599
Fix NU1010 by using literal net10.0 instead of $(LatestTargetFramewor…
Copilot Jul 3, 2026
2b96c96
fix the Windows build
adamsitnik Jul 3, 2026
fe3a017
Replace OperatingSystem.Is* with RuntimeInformation.IsOSPlatform for …
Copilot Jul 3, 2026
775f646
fix the Windows build
adamsitnik Jul 3, 2026
03c1650
Fix SA1208/SA1210: sort using directives alphabetically with System.*…
Copilot Jul 3, 2026
8a1169e
Fix S1128 (unnecessary using System) and FS0052 (struct copy in F# au…
Copilot Jul 3, 2026
9c40b6f
fix the build one more time ;)
adamsitnik Jul 6, 2026
f2a497c
Add TestingPlatformDotnetTestSupport to fix dotnet test
Copilot Jul 6, 2026
30ea7b5
Skip --blame args for Microsoft.Testing.Platform runner (xUnit v3)
Copilot Jul 6, 2026
3c47257
Fix 4 test failures: F# runtime, Verify DisplayClass, OllamaSharp RT0…
Copilot Jul 6, 2026
6161be6
Fix OllamaSharp integration test "zero tests ran" failure with --igno…
Copilot Jul 6, 2026
aa3681d
Fix template test xUnit v2/v3 conflicts and ExtendedLoggerTests .NET …
Copilot Jul 6, 2026
1683dd5
Fix template integration tests: deploy xunit v2 DLLs at runtime for V…
Copilot Jul 7, 2026
bc9ad28
Switch template tests to Microsoft.TemplateEngine.Authoring.TemplateV…
Copilot Jul 7, 2026
f1d06c2
Address review feedback: use ConditionalNet472, fix csproj formatting…
Copilot Jul 7, 2026
9b0eb72
Revert NETFRAMEWORK conditional in ExtendedLoggerTests - AggregateExc…
Copilot Jul 7, 2026
d2d3d57
remove unused using
adamsitnik Jul 7, 2026
9bb93af
Revert "Revert NETFRAMEWORK conditional in ExtendedLoggerTests - Aggr…
adamsitnik Jul 7, 2026
c9f4252
Merge branch 'main' into copilot/update-to-xunit-30
adamsitnik Jul 8, 2026
fb1887e
Apply suggestions from code review
adamsitnik Jul 8, 2026
733864a
Fix template test dotnet host discovery on Linux
Copilot Jul 8, 2026
6e4979f
Revert WellKnownPaths dotnet host fallback change
Copilot Jul 8, 2026
ad3e1c0
Address tagged PR feedback on TFM conditions and csproj formatting
Copilot Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
Run tests with the VS Test Runner (dotnet test) instead of the XUnit Test runner (dotnet exec).
This is needed to produce Cobertura code coverage. See the targets file to more information.
-->
<UseVSTestRunner>true</UseVSTestRunner>
<UseVSTestRunner Condition="'$(TestRunnerName)' != 'XUnitV3'">true</UseVSTestRunner>
</PropertyGroup>

<!-- Enable the Evaluation report builds on all CI builds -->
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@

<Target Name="_ConfigureTestRunnerAdditionalArguments" BeforeTargets="_InnerGetTestsToRun">
<PropertyGroup>
<!-- See https://learn.microsoft.com/dotnet/core/tools/dotnet-test -->
<_BlameArgs>--blame --blame-crash --blame-crash-dump-type full --blame-hang --blame-hang-dump-type full --blame-hang-timeout 6m</_BlameArgs>
<!-- The blame options are only supported by VSTest, not by Microsoft.Testing.Platform (used by xUnit v3) -->
<_BlameArgs Condition="'$(UseMicrosoftTestingPlatformRunner)' != 'true'">--blame --blame-crash --blame-crash-dump-type full --blame-hang --blame-hang-dump-type full --blame-hang-timeout 6m</_BlameArgs>

<!-- This property is used by the Arcade SDK while bootstrapping the VS Test runner -->
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) $(_BlameArgs)</TestRunnerAdditionalArguments>
Expand Down
44 changes: 22 additions & 22 deletions eng/MSBuild/LegacySupport.props
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
<Project>
<ItemGroup Condition="'$(InjectCompilerFeatureRequiredOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectCompilerFeatureRequiredOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\CompilerFeatureRequiredAttribute\*.cs" LinkBase="LegacySupport\CompilerFeatureRequiredAttribute" />
</ItemGroup>

<ItemGroup Condition="'$(InjectRequiredMemberOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectRequiredMemberOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\RequiredMemberAttribute\*.cs" LinkBase="LegacySupport\RequiredMemberAttribute" />
</ItemGroup>

<ItemGroup Condition="'$(InjectSystemIndexOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectSystemIndexOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
Comment thread
adamsitnik marked this conversation as resolved.
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\SystemIndex\*.cs" LinkBase="LegacySupport\SystemIndex" />
</ItemGroup>

<ItemGroup Condition="'$(InjectDiagnosticAttributesOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectDiagnosticAttributesOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp' AND '$(TargetFramework)' != 'netstandard2.1'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\DiagnosticAttributes\*.cs" LinkBase="LegacySupport\DiagnosticAttributes" />
</ItemGroup>

<ItemGroup Condition="'$(InjectIsExternalInitOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="('$(InjectIsExternalInitOnLegacy)' == 'true' or '$(InjectCompilerFeatureRequiredOnLegacy)' == 'true') AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\IsExternalInit\*.cs" LinkBase="LegacySupport\IsExternalInit" />
</ItemGroup>

<ItemGroup Condition="'$(InjectTrimAttributesOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectTrimAttributesOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\TrimAttributes\*.cs" LinkBase="LegacySupport\TrimAttributes" />
</ItemGroup>

<ItemGroup Condition="'$(InjectCallerAttributesOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1')">
<ItemGroup Condition="'$(InjectCallerAttributesOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\CallerAttributes\*.cs" LinkBase="LegacySupport\CallerAttributes" />
</ItemGroup>

<ItemGroup Condition="'$(InjectSkipLocalsInitAttributeOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectSkipLocalsInitAttributeOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\SkipLocalsInitAttribute\*.cs" LinkBase="LegacySupport\SkipLocalsInitAttribute" />
</ItemGroup>

<ItemGroup Condition="'$(InjectStringHashOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0')">
<ItemGroup Condition="'$(InjectStringHashOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\StringHash\*.cs" LinkBase="LegacySupport\StringHash" />
</ItemGroup>

<ItemGroup Condition="'$(InjectBitOperationsOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0')">
<ItemGroup Condition="'$(InjectBitOperationsOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\BitOperations\*.cs" LinkBase="LegacySupport\BitOperations" />
</ItemGroup>

<ItemGroup Condition="'$(InjectStringBuilderOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0')">
<ItemGroup Condition="'$(InjectStringBuilderOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\StringBuilderExtensions\*.cs" LinkBase="LegacySupport\StringBuilderExtensions" />
</ItemGroup>

<ItemGroup Condition="'$(InjectStringSyntaxAttributeOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net6.0')">
<ItemGroup Condition="'$(InjectStringSyntaxAttributeOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\StringSyntaxAttribute\*.cs" LinkBase="LegacySupport\StringSyntaxAttribute" />
</ItemGroup>

<ItemGroup Condition="'$(InjectGetOrAddOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0')">
<ItemGroup Condition="'$(InjectGetOrAddOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\GetOrAdd\*.cs" LinkBase="LegacySupport\GetOrAdd" />
</ItemGroup>

<ItemGroup Condition="'$(InjectDictionaryExtensionsOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0')">
<ItemGroup Condition="'$(InjectDictionaryExtensionsOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\DictionaryExtensions\*.cs" LinkBase="LegacySupport\DictionaryExtensions" />
</ItemGroup>

<ItemGroup Condition="'$(InjectTaskWaitAsyncOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectTaskWaitAsyncOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\TaskWaitAsync\*.cs" LinkBase="LegacySupport\TaskWaitAsync" />
</ItemGroup>

<ItemGroup Condition="'$(InjectExperimentalAttributeOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0')">
<ItemGroup Condition="'$(InjectExperimentalAttributeOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\ExperimentalAttribute\*.cs" LinkBase="LegacySupport\ExperimentalAttribute" />
</ItemGroup>

<ItemGroup Condition="'$(InjectObsoleteAttributeOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectObsoleteAttributeOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\ObsoleteAttribute\*.cs" LinkBase="LegacySupport\ObsoleteAttribute" />
</ItemGroup>

<ItemGroup Condition="'$(InjectPlatformAttributesOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectPlatformAttributesOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\PlatformAttributes\*.cs" LinkBase="LegacySupport\PlatformAttributes" />
</ItemGroup>

<ItemGroup Condition="'$(InjectCollectionBuilderAttributesOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectCollectionBuilderAttributesOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\CollectionBuilder\*.cs" LinkBase="LegacySupport\CollectionBuilder" />
</ItemGroup>

<ItemGroup Condition="'$(InjectMediaTypeMapOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net8.0' or '$(TargetFramework)' == 'net9.0' or '$(TargetFramework)' == 'net10.0')">
<ItemGroup Condition="'$(InjectMediaTypeMapOnLegacy)' == 'true'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\MediaTypeMap\*.cs" LinkBase="LegacySupport\MediaTypeMap" />
</ItemGroup>

<ItemGroup Condition="'$(InjectNullabilityInfoContextOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp3.1')">
<ItemGroup Condition="'$(InjectNullabilityInfoContextOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\NullabilityInfoContext\*.cs" LinkBase="LegacySupport\NullabilityInfoContext" />
</ItemGroup>

<ItemGroup Condition="'$(InjectUnreachableExceptionOnLegacy)' == 'true' AND ('$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net6.0')">
<ItemGroup Condition="'$(InjectUnreachableExceptionOnLegacy)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(MSBuildThisFileDirectory)\..\..\src\LegacySupport\UnreachableException\*.cs" LinkBase="LegacySupport\UnreachableException" />
</ItemGroup>

Expand Down
13 changes: 4 additions & 9 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,10 @@
<!-- Compatibility with VS 17.8/.NET SDK 8.0.1xx -->
<MicrosoftCodeAnalysisVersion>4.8.0</MicrosoftCodeAnalysisVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>3.3.4</MicrosoftCodeAnalysisAnalyzersVersion>
<!--
xUnit version is configured by the Arcade SDK.
https://github.com/dotnet/arcade/blob/f5a7c5d5c56197b09715dece7541ca06beb94eb0/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.targets#L9
-->
<XUnitVersion>2.9.3</XUnitVersion>
<!--
Starting with 3.0.0, xunit.runner.visualstudio only supports net472, but we target net462
-->
<XUnitRunnerVisualStudioVersion>2.8.2</XUnitRunnerVisualStudioVersion>
<!-- xUnit v3 version is configured by the Arcade SDK (TestRunnerName=XUnitV3). -->
<XUnitV3Version>3.2.2</XUnitV3Version>
<XUnitRunnerVisualStudioVersion>3.1.5</XUnitRunnerVisualStudioVersion>
<MicrosoftTestingPlatformVersion>1.9.1</MicrosoftTestingPlatformVersion>
<!-- MEVD is still part of the Semantic Kernel repo -->
<MicrosoftExtensionsVectorDataAbstractionsVersion>9.7.0</MicrosoftExtensionsVectorDataAbstractionsVersion>
<MarkdigSignedVersion>0.43.0</MarkdigSignedVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/packages/General.props
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<PackageVersion Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
Comment thread
adamsitnik marked this conversation as resolved.
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageVersion Include="Microsoft.AspNetCore.Http.Features" Version="2.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageVersion Include="Microsoft.AspNetCore.Routing.Abstractions" Version="2.2.0" />
Expand Down
12 changes: 4 additions & 8 deletions eng/packages/Tests.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
<PackageVersion Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="$(MicrosoftMLTokenizersVersion)" />
<PackageVersion Include="CommunityToolkit.VectorData.InMemory" Version="1.0.0-preview.3" />
<PackageVersion Include="CommunityToolkit.VectorData.SqliteVec" Version="1.0.0-preview.3" />
<PackageVersion Include="Microsoft.TemplateEngine.Authoring.TemplateVerifier" Version="9.0.201" />
<PackageVersion Include="Microsoft.TemplateEngine.TestHelper" Version="9.0.200-rtm.25066.4" />
<PackageVersion Include="Microsoft.TemplateEngine.Authoring.TemplateVerifier.XunitV3" Version="11.0.100-preview.3.26207.106" />
<PackageVersion Include="Moq" Version="4.18.4" />
<PackageVersion Include="Moq.AutoMock" Version="3.1.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
Expand All @@ -33,11 +32,8 @@
<PackageVersion Include="SharpFuzz" Version="2.1.1" />
<PackageVersion Include="StrongNamer" Version="0.2.5" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerVersion)" />
<PackageVersion Include="Verify.Xunit" Version="28.15.0" />
<PackageVersion Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageVersion Include="xunit" Version="$(XUnitVersion)" />
<PackageVersion Include="xunit.extensibility.execution" Version="$(XUnitVersion)" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageVersion Include="Verify.XunitV3" Version="31.20.0" />
<PackageVersion Include="Xunit.Combinatorial" Version="2.0.24" />
</ItemGroup>

<ItemGroup Label="IntegrationTestReferences">
Expand All @@ -49,7 +45,7 @@
<PackageVersion Include="PdfPig" Version="0.1.10" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageVersion Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.1.3" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions eng/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
"diagnosticMessages": true,
"longRunningTestSeconds": 300,
"shadowCopy": false
"longRunningTestSeconds": 300
}
4 changes: 0 additions & 4 deletions scripts/Slngen.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ Push-Location $RepositoryPath
try {
[System.Collections.ArrayList]$Globs = @()

if (!$OnlySources) {
$Globs += "test/TestUtilities/TestUtilities.csproj"
}

if (!$All) {
foreach ($Keyword in $Keywords) {
$Globs += "src/**/*$($Keyword)*/**/*.*sproj"
Expand Down
12 changes: 11 additions & 1 deletion test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
<PropertyGroup>
<!-- Do not generate documentation, and do not warn about enabling /doc for tests. -->
<GenerateDocumentationFile Condition="'$(GenerateDocumentationFile)' == ''">false</GenerateDocumentationFile>
<NoWarn>$(NoWarn);RT0000</NoWarn>
<!-- xUnit1051: methods accepting CancellationToken should use TestContext.Current.CancellationToken.
Fixing it would require updating thousands of call sites; suppress it repo-wide instead. -->
<NoWarn>$(NoWarn);RT0000;xUnit1051</NoWarn>
<!-- Use xUnit v3 test runner -->
<TestRunnerName>XUnitV3</TestRunnerName>
<!-- xUnit v3 requires test projects to be executable -->
<OutputType>Exe</OutputType>
Comment thread
wtgodbe marked this conversation as resolved.
<!-- Enable dotnet test to use Microsoft.Testing.Platform protocol directly
instead of the VSTest testhost (which requires testhost.dll/Newtonsoft.Json). -->
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
</PropertyGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<TargetFrameworks>$(LatestTargetFramework)</TargetFrameworks>
<ConditionalNet472 Condition="'$(IsWindowsBuild)' == 'true' AND ('$(CustomTargetFrameworks)' == '' OR $(CustomTargetFrameworks.Contains('net462')))">;net472</ConditionalNet472>
</PropertyGroup>
</Project>
21 changes: 18 additions & 3 deletions test/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<XUnitCoreSettingsFile>$(MSBuildThisFileDirectory)\..\eng\xunit.runner.json</XUnitCoreSettingsFile>
<XUnitDesktopSettingsFile>$(MSBuildThisFileDirectory)\..\eng\xunit.runner.json</XUnitDesktopSettingsFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture.AutoMoq" />
<PackageReference Include="autofixture" />
<PackageReference Include="AwesomeAssertions" />
<PackageReference Include="Moq.AutoMock" />
<PackageReference Include="Moq" />
<PackageReference Include="StrongNamer" Condition="'$(SignArtifacts)' == 'true' " />
<PackageReference Include="Verify.Xunit" />
<PackageReference Include="Verify.XunitV3" />
<PackageReference Include="Xunit.Combinatorial" />

<Content Include="$(MSBuildThisFileDirectory)\..\eng\xunit.runner.json" CopyToOutputDirectory="PreserveNewest" Visible="false" />
</ItemGroup>

<!--
Override $(TargetFrameworks) to contain only the current TFM before Verify's WriteVerifyAttributes
Comment thread
adamsitnik marked this conversation as resolved.
target runs. When Verify sees multiple TFMs in the Verify.TargetFrameworks assembly metadata, it
auto-adds a TFM discriminator (e.g. DotNet10_0) to verified file names, but the existing
.verified.txt files don't have one. Setting a single TFM prevents the discriminator.
-->
<Target Name="_OverrideVerifyTargetFrameworks" BeforeTargets="WriteVerifyAttributes">
<PropertyGroup>
<TargetFrameworks>$(TargetFramework)</TargetFrameworks>
</PropertyGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
Expand All @@ -12,7 +12,6 @@
using Microsoft.Extensions.Logging;
using Microsoft.Gen.Shared;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.Gen.ComplianceReports.Tests;

Expand Down
Loading
Loading