Tests.System.Reactive.csproj 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. MSTEST0049: Consider overload accepting a CancellationToken - there are 136 of these, and since I've not yet run into a situation that this would have helped in, it's not a priority.
  6. -->
  7. <NoWarn>$(NoWarn);CS0618;IDE0330;MSTEST0049</NoWarn>
  8. </PropertyGroup>
  9. <PropertyGroup Condition="$(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows')) or '$(TargetFramework)' == 'net472'">
  10. <UseWPF>true</UseWPF>
  11. <UseWindowsForms>true</UseWindowsForms>
  12. </PropertyGroup>
  13. <ItemGroup>
  14. <Content Include="xunit.runner.json">
  15. <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  16. </Content>
  17. </ItemGroup>
  18. <ItemGroup>
  19. <!--
  20. We need to be on a sufficiently recent version of the test framework, because we need this fix:
  21. https://github.com/microsoft/testfx/pull/1071
  22. Without this, the test runner fails to process Windows-version-specific TFMs for .NET 6.0.
  23. Since the various libraries that require net6.0-windows all specify a minimum version (10.0.19041
  24. for reasons not currently clear to me; idg10) this test project needs to specify at least as new
  25. a version. If we write just net6.0-windows, that turns out to imply Windows 7.0, so it is not
  26. considered compatible with a net6.0-windows10.0.19041 library.
  27. Before that PR was merged, the test runner wouldn't work if the host specified a TFM with a
  28. specific Windows version.
  29. -->
  30. <PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
  31. <PackageReference Include="MSTest.TestAdapter" Version="3.11.0" />
  32. <PackageReference Include="MSTest.TestFramework" Version="3.11.0" />
  33. <PackageReference Include="xunit.assert" Version="2.9.3" />
  34. <ProjectReference Include="..\..\src\System.Reactive\System.Reactive.csproj" />
  35. <ProjectReference Include="..\..\src\System.Reactive.Observable.Aliases\System.Reactive.Observable.Aliases.csproj" />
  36. <ProjectReference Include="..\..\src\Microsoft.Reactive.Testing\Microsoft.Reactive.Testing.csproj" />
  37. </ItemGroup>
  38. </Project>