Tests.System.Reactive.csproj 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <Project Sdk="Microsoft.NET.Sdk">
  2. <PropertyGroup>
  3. <TargetFrameworks>net472;net8.0;net8.0-windows10.0.19041;net9.0;net9.0-windows10.0.19041</TargetFrameworks>
  4. <!-- IDE0330: Prefer 'System.Threading.Lock': not applicable for as long as we support .NET 8.0 or .NET FX, because it is unavailable on those targets. -->
  5. <NoWarn>$(NoWarn);CS0618;IDE0330</NoWarn>
  6. </PropertyGroup>
  7. <PropertyGroup Condition="$(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows')) or '$(TargetFramework)' == 'net472'">
  8. <UseWPF>true</UseWPF>
  9. <UseWindowsForms>true</UseWindowsForms>
  10. </PropertyGroup>
  11. <ItemGroup>
  12. <Content Include="xunit.runner.json">
  13. <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  14. </Content>
  15. </ItemGroup>
  16. <ItemGroup>
  17. <!--
  18. We need to be on a sufficiently recent version of the test framework, because we need this fix:
  19. https://github.com/microsoft/testfx/pull/1071
  20. Without this, the test runner fails to process Windows-version-specific TFMs for .NET 6.0.
  21. Since the various libraries that require net6.0-windows all specify a minimum version (10.0.19041
  22. for reasons not currently clear to me; idg10) this test project needs to specify at least as new
  23. a version. If we write just net6.0-windows, that turns out to imply Windows 7.0, so it is not
  24. considered compatible with a net6.0-windows10.0.19041 library.
  25. Before that PR was merged, the test runner wouldn't work if the host specified a TFM with a
  26. specific Windows version.
  27. -->
  28. <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
  29. <PackageReference Include="MSTest.TestAdapter" Version="3.6.1" />
  30. <PackageReference Include="MSTest.TestFramework" Version="3.6.1" />
  31. <PackageReference Include="xunit.assert" Version="2.8.0" />
  32. <ProjectReference Include="..\..\src\System.Reactive\System.Reactive.csproj" />
  33. <ProjectReference Include="..\..\src\System.Reactive.Observable.Aliases\System.Reactive.Observable.Aliases.csproj" />
  34. <ProjectReference Include="..\..\src\Microsoft.Reactive.Testing\Microsoft.Reactive.Testing.csproj" />
  35. </ItemGroup>
  36. <ItemGroup>
  37. <PackageReference Update="coverlet.collector" Version="6.0.2">
  38. <PrivateAssets>all</PrivateAssets>
  39. <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
  40. </PackageReference>
  41. </ItemGroup>
  42. </Project>