Skip to content

Commit b32cb59

Browse files
authored
Further .NET 9.0 SDK updates (#2266)
* Use 9.0 on integration test CI stage * fix some additional diagnostics that have appeared recently * Update AsyncRx.NET to .NET 9.0 SDK * Fix bizarre errors about HttpResponse causing Ix build to fail
1 parent ddf1846 commit b32cb59

File tree

17 files changed

+72
-25
lines changed

17 files changed

+72
-25
lines changed

.editorconfig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,10 @@ csharp_space_between_square_brackets = false
258258
dotnet_diagnostic.IDE0290.severity = none
259259

260260
# Namespace style.
261-
csharp_style_namespace_declarations = block_scoped
261+
csharp_style_namespace_declarations = block_scoped
262+
dotnet_diagnostic.IDE0290.severity = none
263+
264+
# Target-typed new expressions
265+
# We will probably adopt these at some point, but for some reason the IDE only just started complaining about them,
266+
# and I don't want to deal with all these while in the middle of the Slight Deunification.
267+
dotnet_diagnostic.IDE0090.severity = none

Ix.NET/Source/System.Interactive.Async.Tests/System/Linq/AsyncEnumerableExTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected async Task SequenceIdentity<T>(IAsyncEnumerable<T> enumerable)
6363
var res1 = await enumerable.ToListAsync();
6464
var res2 = await enumerable.ToListAsync();
6565

66-
res1.Should().BeEquivalentTo(res2);
66+
Assert.Equivalent(res1, res2, strict: true);
6767
}
6868
}
6969
}

Ix.NET/Source/System.Linq.Async.Tests/System/Linq/AsyncEnumerableTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected async Task SequenceIdentity<T>(IAsyncEnumerable<T> enumerable)
6262
var res1 = await enumerable.ToListAsync();
6363
var res2 = await enumerable.ToListAsync();
6464

65-
res1.Should().BeEquivalentTo(res2);
65+
Assert.Equivalent(res1, res2, strict: true);
6666
}
6767

6868
protected static IAsyncEnumerable<TValue> Throw<TValue>(Exception exception)

Rx.NET/Source/CodeCoverage.runsettings

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
Workaround for failure to run tests on .NET FX on v3.3.1 MSTest packages
66
-->
77
<RunConfiguration>
8-
<DisableAppDomain>True</DisableAppDomain>
8+
<DisableAppDomain>True</DisableAppDomain>
9+
<ExecutionThreadApartmentState>STA</ExecutionThreadApartmentState>
910
</RunConfiguration>
1011

1112
<DataCollectionRunSettings>

Rx.NET/Source/Directory.build.props

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232
<ItemGroup>
3333
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
3434

35-
<!--
36-
Nerdbank.GitVersioning 3.6.128 injects a reference to a .proj file that doesn't work inside the
37-
UWP test runner project. We don't ship that as a NuGet package, so it doesn't matter what its
38-
version number is.
39-
-->
4035
<PackageReference
4136
Include="Nerdbank.GitVersioning"
4237
Version="3.8.118"
@@ -119,9 +114,10 @@
119114
[.. x]. To me, this is less readable, and it doesn't improve performance, as far as we know.
120115
121116
CA1510 - use ArgumentNullException.ThrowIf (not available on all targets)
117+
CA1512 - use ArgumentOutOfRangeException.ThrowIfXxx (not available on all targets)
122118
CA1513 - use ObjectDisposedException.ThrowIf (not available on all targets)
123119
-->
124-
<NoWarn>$(NoWarn);CA1001;CA2213;CA1510;CA1513;IDE0028;IDE0056;IDE0057;IDE0130;IDE0290;IDE0305;IDE0306</NoWarn>
120+
<NoWarn>$(NoWarn);CA1001;CA2213;CA1510;CA1512;CA1513;IDE0028;IDE0056;IDE0057;IDE0130;IDE0290;IDE0305;IDE0306</NoWarn>
125121
</PropertyGroup>
126122

127123
<ItemGroup>

Rx.NET/Source/Directory.build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<PropertyGroup>
66
<Product>$(AssemblyName) ($(TargetFramework))</Product>
77
</PropertyGroup>
8-
8+
99
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
1010
<DefineConstants>$(DefineConstants);HAS_WINFORMS;HAS_WPF;HAS_WINRT;HAS_DISPATCHER;HAS_REMOTING;DESKTOPCLR;NO_NULLABLE_ATTRIBUTES</DefineConstants>
1111
</PropertyGroup>

Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
using System.Reactive.Linq;
77
using BenchmarkDotNet.Running;
88

9+
using Microsoft.VisualStudio.TestTools.UnitTesting;
10+
11+
[assembly:DoNotParallelize] // Not really a test project, but the build tools think we are, and complain if we don't state our parallelization policy.
12+
913
namespace Benchmarks.System.Reactive
1014
{
1115
internal class Program

Rx.NET/Source/tests/Tests.System.Reactive.Uwp.DeviceRunner/Tests.System.Reactive.Uwp.DeviceRunner.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,18 @@
147147
</PackageReference>
148148
<PackageReference Include="xunit.assert" Version="2.8.0" />
149149
</ItemGroup>
150+
<ItemGroup>
151+
<!--
152+
Nerdbank.GitVersioning 3.6.128 injects a reference to a .proj file that doesn't work inside the
153+
UWP test runner project. We don't ship that as a NuGet package, so it doesn't matter what its
154+
version number is.
155+
However, this doesn't seem to work. And excluding this project in the Directory.Build.props file
156+
where we add this reference in the first place also doesn't work. I think this is coming in
157+
transitively. So we need to work out exactly how .nuget\packages\nerdbank.gitversioning\3.6.143\build\PrivateP2PCaching.proj
158+
is getting included, and work out how to stop that.
159+
-->
160+
<PackageReference Remove="Nerdbank.GitVersioning" />
161+
</ItemGroup>
150162
<ItemGroup>
151163
<ApplicationDefinition Include="App.xaml">
152164
<Generator>MSBuild:Compile</Generator>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using Microsoft.VisualStudio.TestTools.UnitTesting;
6+
7+
[assembly:Parallelize]

Rx.NET/Source/tests/Tests.System.Reactive/Tests.System.Reactive.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,11 @@
4141
<ProjectReference Include="..\..\src\Microsoft.Reactive.Testing\Microsoft.Reactive.Testing.csproj" />
4242
</ItemGroup>
4343

44+
<ItemGroup>
45+
<PackageReference Update="coverlet.collector" Version="6.0.2">
46+
<PrivateAssets>all</PrivateAssets>
47+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
48+
</PackageReference>
49+
</ItemGroup>
50+
4451
</Project>

0 commit comments

Comments
 (0)