Tests.System.Reactive.csproj 2.6 KB

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