Skip to content

Commit 7458530

Browse files
Baseline migration to .NET 10 for release 10.0
1 parent 3ce2ca3 commit 7458530

330 files changed

Lines changed: 1865 additions & 1533 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
# ASP.NET API Versioning
66

7-
| :mega: Check out the [announcement](../../discussions/807) regarding upcoming changes |
8-
|-|
9-
107
<img align="right" width="100px" src="logo.svg" />
118

129
The _"Asp"_ project, more formally known as ASP.NET API Versioning, gives you a powerful, but easy-to-use method for

build/test.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

44
<PropertyGroup>
5+
<OutputType>Exe</OutputType>
56
<IsPackable>false</IsPackable>
67
<Nullable>disable</Nullable>
78
<IsClsCompliant>false</IsClsCompliant>
9+
<NoWarn>$(NoWarn);CA1515</NoWarn>
10+
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
11+
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
812
<AcceptanceTestPrefix Condition="$(MSBuildProjectName.Contains('Acceptance'))">acceptance.</AcceptanceTestPrefix>
913
</PropertyGroup>
1014

build/test.targets

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

4-
<PropertyGroup>
5-
<FluentAssertionsVersion>6.8.0</FluentAssertionsVersion>
6-
7-
<!--
8-
beware of other versions that may contain SponsorLink
9-
REF: https://github.com/moq/moq/issues/1372
10-
-->
11-
<MoqVersion>4.20.69</MoqVersion>
12-
<XunitRunnerVersion>2.5.0</XunitRunnerVersion>
13-
</PropertyGroup>
14-
15-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
16-
<FluentAssertionsVersion>5.10.3</FluentAssertionsVersion>
17-
<MoqVersion>4.17.2</MoqVersion>
18-
<XunitRunnerVersion>2.4.3</XunitRunnerVersion>
19-
</PropertyGroup>
20-
214
<ItemGroup Condition=" '$(IsSharedProject)' == 'false' ">
22-
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
23-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0-*" />
24-
<PackageReference Include="Moq" Version="$(MoqVersion)" />
25-
<PackageReference Include="xunit" Version="2.5.0" />
26-
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVersion)" />
5+
<PackageReference Include="FluentAssertions" Version="8.8.*" />
6+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" />
7+
<PackageReference Include="Microsoft.Testing.Platform.MSBuild" Version="2.*" />
8+
<PackageReference Include="Moq" Version="4.20.69" />
9+
<PackageReference Include="xunit.v3.mtp-v2" Version="3.*" />
2710
</ItemGroup>
2811

2912
<ItemGroup Condition=" '$(IsAspNetCore)' == 'true' ">
30-
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(DotNetReleaseBasePackageVersion)" />
13+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(DotNetReleaseBasePackageVersion).*" />
3114
</ItemGroup>
3215

3316
<ItemGroup>
3417
<Using Include="FluentAssertions" />
3518
<Using Include="Moq" />
3619
<Using Include="Xunit" />
37-
<Using Include="Xunit.Abstractions" />
20+
<Using Include="Xunit.Sdk" />
21+
<Using Include="Xunit.v3" />
3822
</ItemGroup>
3923

4024
</Project>

examples/AspNet/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNet.WebApi.OwinSelfHost" Version="5.2.9" />
11+
<PackageReference Include="Microsoft.AspNet.WebApi.OwinSelfHost" Version="5.3.*" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

examples/AspNet/OData/OpenApiODataWebApiExample/Models/Order.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ public class Order
4848
/// </summary>
4949
/// <value>The <see cref="IList{T}">list</see> of order <see cref="LineItem">line items</see>.</value>
5050
[Contained]
51-
public virtual IList<LineItem> LineItems { get; } = new List<LineItem>();
51+
public virtual IList<LineItem> LineItems { get; } = [];
5252
}

examples/AspNet/OData/OpenApiODataWebApiExample/V3/AcmeController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ private static Supplier NewSupplier() =>
5858
{
5959
Id = 42,
6060
Name = "Acme",
61-
Products = new List<Product>()
62-
{
61+
Products =
62+
[
6363
new()
6464
{
6565
Id = 42,
@@ -68,6 +68,6 @@ private static Supplier NewSupplier() =>
6868
Price = 42,
6969
SupplierId = 42,
7070
},
71-
},
71+
],
7272
};
7373
}

examples/AspNet/OData/OpenApiODataWebApiExample/V3/SuppliersController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ private static Supplier NewSupplier( int id ) =>
156156
{
157157
Id = id,
158158
Name = "Supplier " + id.ToString(),
159-
Products = new List<Product>()
160-
{
159+
Products =
160+
[
161161
new()
162162
{
163163
Id = id,
@@ -166,6 +166,6 @@ private static Supplier NewSupplier( int id ) =>
166166
Price = id,
167167
SupplierId = id,
168168
},
169-
},
169+
],
170170
};
171171
}

examples/AspNetCore/OData/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Import Project="$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)','$(MSBuildThisFileDirectory)../'))" />
55

66
<ItemGroup>
7-
<PackageReference Include="Microsoft.AspNetCore.OData" Version="9.2.1" />
7+
<PackageReference Include="Microsoft.AspNetCore.OData" Version="10.0.0-*" />
88
</ItemGroup>
99

1010
</Project>

examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
</PropertyGroup>
6+
37
<ItemGroup>
48
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData\Asp.Versioning.OData.csproj" />
59
</ItemGroup>
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
</PropertyGroup>
6+
37
<ItemGroup>
4-
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData\Asp.Versioning.OData.csproj" />
8+
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData\Asp.Versioning.OData.csproj" />
59
</ItemGroup>
610

711
</Project>

0 commit comments

Comments
 (0)