Skip to content

Commit efd4845

Browse files
Centralize .NET versions and make major releases easier to update
1 parent 2174334 commit efd4845

File tree

30 files changed

+58
-76
lines changed

30 files changed

+58
-76
lines changed

build/test.targets

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<PropertyGroup>
55
<FluentAssertionsVersion>6.8.0</FluentAssertionsVersion>
6-
6+
77
<!--
88
beware of other versions that may contain SponsorLink
99
REF: https://github.com/moq/moq/issues/1372
@@ -27,7 +27,7 @@
2727
</ItemGroup>
2828

2929
<ItemGroup Condition=" '$(IsAspNetCore)' == 'true' ">
30-
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.10" />
30+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(DotNetReleaseBasePackageVersion)" />
3131
</ItemGroup>
3232

3333
<ItemGroup>
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<Import Project="$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)','$(MSBuildThisFileDirectory)../'))" />
5+
6+
<PropertyGroup>
7+
<TargetFramework>net8.0</TargetFramework>
8+
</PropertyGroup>
9+
10+
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

4-
<Import Project="$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)','$(MSBuildThisFileDirectory)../'))"
5-
Condition="Exists($([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)','$(MSBuildThisFileDirectory)../')))"/>
4+
<Import Project="$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)','$(MSBuildThisFileDirectory)../'))" />
65

76
<ItemGroup>
8-
<PackageReference Include="Microsoft.AspNetCore.OData" Version="8.0.11" />
7+
<PackageReference Include="Microsoft.AspNetCore.OData" Version="8.2.3" />
98
</ItemGroup>
109

1110
</Project>

examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<ItemGroup>
84
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData\Asp.Versioning.OData.csproj" />
95
</ItemGroup>

examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<ItemGroup>
84
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData\Asp.Versioning.OData.csproj" />
95
</ItemGroup>

examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<ItemGroup>
84
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData\Asp.Versioning.OData.csproj" />
95
</ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
54
<GenerateDocumentationFile>true</GenerateDocumentationFile>
65
</PropertyGroup>
76

87
<ItemGroup>
9-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0-*" />
8+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0-*" />
109
</ItemGroup>
1110

1211
<ItemGroup>
1312
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData.ApiExplorer\Asp.Versioning.OData.ApiExplorer.csproj" />
1413
</ItemGroup>
15-
14+
1615
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
54
<GenerateDocumentationFile>true</GenerateDocumentationFile>
65
</PropertyGroup>
76

87
<ItemGroup>
9-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0-*" />
8+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0-*" />
109
</ItemGroup>
1110

1211
<ItemGroup>
1312
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData.ApiExplorer\Asp.Versioning.OData.ApiExplorer.csproj" />
1413
</ItemGroup>
15-
14+
1615
</Project>

examples/AspNetCore/WebApi/BasicExample/BasicExample.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<ItemGroup>
84
<ProjectReference Include="..\..\..\..\src\AspNetCore\WebApi\src\Asp.Versioning.Mvc\Asp.Versioning.Mvc.csproj" />
95
</ItemGroup>

examples/AspNetCore/WebApi/ByNamespaceExample/ByNamespaceExample.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<ItemGroup>
84
<ProjectReference Include="..\..\..\..\src\AspNetCore\WebApi\src\Asp.Versioning.Mvc\Asp.Versioning.Mvc.csproj" />
95
</ItemGroup>

examples/AspNetCore/WebApi/ConventionsExample/ConventionsExample.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<ItemGroup>
84
<ProjectReference Include="..\..\..\..\src\AspNetCore\WebApi\src\Asp.Versioning.Mvc\Asp.Versioning.Mvc.csproj" />
95
</ItemGroup>

examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
54
<Nullable>enable</Nullable>
65
</PropertyGroup>
76

examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.csproj

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<ItemGroup>
8-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0-*" />
4+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0-*" />
95
</ItemGroup>
106

117
<ItemGroup>

examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
54
<GenerateDocumentationFile>true</GenerateDocumentationFile>
65
</PropertyGroup>
76

87
<ItemGroup>
9-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0-*" />
8+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0-*" />
109
</ItemGroup>
1110

1211
<ItemGroup>

src/Abstractions/src/Asp.Versioning.Abstractions/Asp.Versioning.Abstractions.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
<PropertyGroup>
44
<VersionPrefix>7.0.0</VersionPrefix>
55
<AssemblyVersion>7.0.0.0</AssemblyVersion>
6-
<TargetFrameworks>net7.0;netstandard1.0;netstandard2.0</TargetFrameworks>
6+
<TargetFrameworks>$(DefaultTargetFramework);netstandard1.0;netstandard2.0</TargetFrameworks>
77
<AssemblyTitle>API Versioning Abstractions</AssemblyTitle>
88
<Description>The abstractions library for API versioning.</Description>
99
<RootNamespace>Asp.Versioning</RootNamespace>
1010
<PackageTags>Asp;AspNet;AspNetCore;Versioning</PackageTags>
1111
</PropertyGroup>
1212

1313
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.0' ">
14-
<Compile Remove="netstandard2.0\**\*.cs;net7.0\**\*.cs" />
15-
<None Include="netstandard2.0\**\*.cs;net7.0\**\*.cs" />
14+
<Compile Remove="netstandard2.0\**\*.cs;net#.0\**\*.cs" />
15+
<None Include="netstandard2.0\**\*.cs;net#.0\**\*.cs" />
1616
<Using Remove="System.Net.Http" />
1717
</ItemGroup>
1818

@@ -22,8 +22,8 @@
2222
</ItemGroup>
2323

2424
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
25-
<Compile Remove="net7.0\**\*.cs" />
26-
<None Include="net7.0\**\*.cs" />
25+
<Compile Remove="net#.0\**\*.cs" />
26+
<None Include="net#.0\**\*.cs" />
2727
</ItemGroup>
2828

2929
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.0' ">
@@ -40,7 +40,7 @@
4040
</ItemGroup>
4141

4242
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard1.0' ">
43-
<PackageReference Include="Microsoft.Extensions.Primitives" Version="7.0.0" />
43+
<PackageReference Include="Microsoft.Extensions.Primitives" Version="$(DotNetReleasePackageVersion)" />
4444
</ItemGroup>
4545

4646
</Project>

src/Abstractions/test/Asp.Versioning.Abstractions.Tests/Asp.Versioning.Abstractions.Tests.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net7.0;net452;net472</TargetFrameworks>
3+
<TargetFrameworks>$(DefaultTargetFramework);net452;net472</TargetFrameworks>
44
<RootNamespace>Asp.Versioning</RootNamespace>
55
</PropertyGroup>
6-
<ItemGroup Condition=" ('$(TargetFramework)' == 'net452') OR ('$(TargetFramework)' == 'net472') ">
7-
<Compile Remove="net7.0\**\*.cs" />
8-
<None Include="net7.0\**\*.cs" />
6+
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
7+
<Compile Remove="net#.0\**\*.cs" />
8+
<None Include="net#.0\**\*.cs" />
99
<Using Remove="System.Net.Http" />
1010
</ItemGroup>
11-
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
11+
<ItemGroup Condition=" '$(TargetFramework)' == '$(DefaultTargetFramework)' ">
1212
<Compile Remove="net452\**\*.cs" />
1313
<None Include="net452\**\*.cs" />
1414
</ItemGroup>

src/AspNetCore/Acceptance/Asp.Versioning.Mvc.Acceptance.Tests/Asp.Versioning.Mvc.Acceptance.Tests.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<RootNamespace>Asp.Versioning</RootNamespace>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
10-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="7.0.0" />
10+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="$(DotNetReleasePackageVersion)" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

src/AspNetCore/OData/src/Asp.Versioning.OData.ApiExplorer/Asp.Versioning.OData.ApiExplorer.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<VersionPrefix>7.1.0</VersionPrefix>
55
<AssemblyVersion>7.1.0.0</AssemblyVersion>
6-
<TargetFramework>net7.0</TargetFramework>
6+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
77
<RootNamespace>Asp.Versioning</RootNamespace>
88
<AssemblyTitle>ASP.NET Core API Versioning API Explorer for OData v4.0</AssemblyTitle>
99
<Description>The API Explorer extensions for ASP.NET Core API Versioning and OData v4.0.</Description>

src/AspNetCore/OData/src/Asp.Versioning.OData/Asp.Versioning.OData.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<VersionPrefix>7.1.0</VersionPrefix>
55
<AssemblyVersion>7.1.0.0</AssemblyVersion>
6-
<TargetFramework>net7.0</TargetFramework>
6+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
77
<RootNamespace>Asp.Versioning</RootNamespace>
88
<AssemblyTitle>ASP.NET Core API Versioning with OData v4.0</AssemblyTitle>
99
<Description>A service API versioning library for Microsoft ASP.NET Core with OData v4.0.</Description>

src/AspNetCore/OData/test/Asp.Versioning.OData.ApiExplorer.Tests/Asp.Versioning.OData.ApiExplorer.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<RootNamespace>Asp.Versioning</RootNamespace>
66
</PropertyGroup>
77

src/AspNetCore/OData/test/Asp.Versioning.OData.Tests/Asp.Versioning.OData.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<RootNamespace>Asp.Versioning</RootNamespace>
66
</PropertyGroup>
77

src/AspNetCore/WebApi/src/Asp.Versioning.Http/Asp.Versioning.Http.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<VersionPrefix>7.1.0</VersionPrefix>
55
<AssemblyVersion>7.1.0.0</AssemblyVersion>
6-
<TargetFramework>net7.0</TargetFramework>
6+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
77
<RootNamespace>Asp.Versioning</RootNamespace>
88
<AssemblyTitle>ASP.NET Core API Versioning</AssemblyTitle>
99
<Description>A service API versioning library for Microsoft ASP.NET Core.</Description>

src/AspNetCore/WebApi/src/Asp.Versioning.Mvc.ApiExplorer/Asp.Versioning.Mvc.ApiExplorer.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<VersionPrefix>7.1.0</VersionPrefix>
55
<AssemblyVersion>7.1.0.0</AssemblyVersion>
6-
<TargetFramework>net7.0</TargetFramework>
6+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
77
<RootNamespace>Asp.Versioning.ApiExplorer</RootNamespace>
88
<AssemblyTitle>ASP.NET Core API Versioning API Explorer</AssemblyTitle>
99
<Description>The API Explorer extensions for ASP.NET Core API Versioning.</Description>

src/AspNetCore/WebApi/src/Asp.Versioning.Mvc/Asp.Versioning.Mvc.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<VersionPrefix>7.1.1</VersionPrefix>
55
<AssemblyVersion>7.1.0.0</AssemblyVersion>
6-
<TargetFramework>net7.0</TargetFramework>
6+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
77
<RootNamespace>Asp.Versioning</RootNamespace>
88
<AssemblyTitle>ASP.NET Core API Versioning</AssemblyTitle>
99
<Description>A service API versioning library for Microsoft ASP.NET Core MVC.</Description>

src/AspNetCore/WebApi/test/Asp.Versioning.Http.Tests/Asp.Versioning.Http.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<RootNamespace>Asp.Versioning</RootNamespace>
66
</PropertyGroup>
77

src/AspNetCore/WebApi/test/Asp.Versioning.Mvc.ApiExplorer.Tests/Asp.Versioning.Mvc.ApiExplorer.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<RootNamespace>Asp.Versioning.ApiExplorer</RootNamespace>
66
</PropertyGroup>
77

src/AspNetCore/WebApi/test/Asp.Versioning.Mvc.Tests/Asp.Versioning.Mvc.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<RootNamespace>Asp.Versioning</RootNamespace>
66
</PropertyGroup>
77

src/Client/src/Asp.Versioning.Http.Client/Asp.Versioning.Http.Client.csproj

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
<PropertyGroup>
44
<VersionPrefix>7.0.1</VersionPrefix>
55
<AssemblyVersion>7.0.0.0</AssemblyVersion>
6-
<TargetFrameworks>net7.0;netstandard1.1;netstandard2.0</TargetFrameworks>
6+
<TargetFrameworks>$(DefaultTargetFramework);netstandard1.1;netstandard2.0</TargetFrameworks>
77
<RootNamespace>Asp.Versioning.Http</RootNamespace>
88
<AssemblyTitle>API Versioning Client Extensions</AssemblyTitle>
99
<Description>The HTTP client extensions library for API versioning.</Description>
1010
<PackageTags>Asp;AspNet;AspNetCore;Versioning;Http</PackageTags>
1111
</PropertyGroup>
1212

1313
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
14-
<Compile Remove="net7.0\**\*.cs" />
15-
<None Include="net7.0\**\*.cs" />
14+
<Compile Remove="net#.0\**\*.cs" />
15+
<None Include="net#.0\**\*.cs" />
1616
</ItemGroup>
1717

1818
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
@@ -27,8 +27,9 @@
2727
<PackageReference Include="System.Net.Http" Version="4.3.4" />
2828
</ItemGroup>
2929

30-
<ItemGroup Condition=" ('$(TargetFramework)' == 'net7.0') OR ('$(TargetFramework)' == 'netstandard2.0') ">
31-
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
30+
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard1.1' ">
31+
<PackageReference Include="Microsoft.Extensions.Http" Version="$(DotNetReleasePackageVersion)" />
32+
</ItemGroup>
3233
</ItemGroup>
3334

3435
<ItemGroup>

0 commit comments

Comments
 (0)