Skip to content

Commit 95e3048

Browse files
authored
.NET 8.0 (#1791)
* .NET 8.0 * Update WixToolset * Fix some test failures * Improve serialization of .NET primitive types * Build with .NET 9 SDK * Bump packages * Use contraint-based assert and switch back to .NET 8 for testing * Fix failing test * Don't add .NET 7 to CI * Get test passing on Mono
1 parent 82f498c commit 95e3048

Some content is hidden

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

72 files changed

+607
-401
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ dotnet_diagnostic.CA1305.severity = none # CA1305: Specify IFormatProvide
6060
dotnet_diagnostic.CA1307.severity = suggestion # CA1307: Specify StringComparison for clarity
6161
dotnet_diagnostic.CA1309.severity = suggestion # CA1309: Use ordinal string comparison
6262
dotnet_diagnostic.CA1310.severity = warning # CA1310: Specify StringComparison for correctness
63+
dotnet_diagnostic.CA1510.severity = none # CA1510: Use ArgumentNullException throw helper
64+
dotnet_diagnostic.CA1512.severity = none # CA1512: Use ArgumentOutOfRangeException throw helper
65+
dotnet_diagnostic.CA1513.severity = none # CA1513: Use ObjectDisposedException throw helper
6366
dotnet_diagnostic.CA1707.severity = none # CA1707: Identifiers should not contain underscores
6467
dotnet_diagnostic.CA1708.severity = none # CA1708: Identifiers should differ by more than case
6568
dotnet_diagnostic.CA1710.severity = none # CA1710: Identifiers should have correct suffix
@@ -81,8 +84,10 @@ dotnet_diagnostic.CA1845.severity = none # CA1845: Use span-based 'string
8184
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer 'AsSpan' over 'Substring'
8285
dotnet_diagnostic.CA1847.severity = none # CA1847: Use char literal for a single character lookup
8386
dotnet_diagnostic.CA1852.severity = suggestion # CA1852: Seal internal types
87+
dotnet_diagnostic.CA1854.severity = suggestion # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
8488
dotnet_diagnostic.CA1859.severity = suggestion # CA1859: Use concrete types when possible for improved performance
8589
dotnet_diagnostic.CA1861.severity = suggestion # CA1861: Avoid constant arrays as arguments
90+
dotnet_diagnostic.CA1863.severity = none # CA1863: Use 'CompositeFormat'
8691
dotnet_diagnostic.CA2101.severity = suggestion # CA2101: Specify marshaling for P/Invoke string arguments
8792
dotnet_diagnostic.CA2201.severity = none # CA2201: Do not raise reserved exception types
8893
dotnet_diagnostic.CA2208.severity = suggestion # CA2208: Instantiate argument exceptions correctly

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [windows-latest, ubuntu-latest, macos-latest]
13+
os: [windows-latest, ubuntu-latest, macos-latest-large]
1414

1515
steps:
1616
- name: Install tools
@@ -27,10 +27,10 @@ jobs:
2727
uses: actions/setup-dotnet@v1
2828
with:
2929
dotnet-version: '6.0.x'
30-
- name: Setup .NET 7.0
30+
- name: Setup .NET 8.0
3131
uses: actions/setup-dotnet@v1
3232
with:
33-
dotnet-version: '7.0.x'
33+
dotnet-version: '8.0.x'
3434
- name: Version Information
3535
run: |
3636
dotnet --info
@@ -54,6 +54,6 @@ jobs:
5454
- name: Test (net6.0)
5555
run: ./make.ps1 -frameworks net6.0 test-all
5656
shell: pwsh
57-
- name: Test (net7.0)
58-
run: ./make.ps1 -frameworks net7.0 test-all
57+
- name: Test (net8.0)
58+
run: ./make.ps1 -frameworks net8.0 test-all
5959
shell: pwsh

Build/net7.0-windows.props

Lines changed: 0 additions & 9 deletions
This file was deleted.

Build/net8.0-windows.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<PropertyGroup>
3+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
4+
<IntermediateOutputPath Condition=" '$(TargetFramework)' == 'net8.0-windows' ">$(BaseIntermediateOutputPath)$(Configuration)\net8.0</IntermediateOutputPath>
5+
<OutputPath Condition=" '$(TargetFramework)' == 'net8.0-windows' ">$(BaseOutputPath)\net8.0</OutputPath>
6+
</PropertyGroup>
7+
8+
<Import Project="net8.0.props" />
9+
</Project>

Build/net7.0.props renamed to Build/net8.0.props

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
<Features>$(Features);FEATURE_ASSEMBLY_GETFORWARDEDTYPES</Features>
1010
<Features>$(Features);FEATURE_ASSEMBLY_RESOLVE</Features>
1111
<Features>$(Features);FEATURE_ASSEMBLYBUILDER_DEFINEDYNAMICASSEMBLY</Features>
12-
<Features>$(Features);FEATURE_BASIC_CONSOLE</Features>
1312
<Features>$(Features);FEATURE_CODEDOM</Features>
1413
<Features>$(Features);FEATURE_COM</Features>
1514
<Features>$(Features);FEATURE_CONFIGURATION</Features>
1615
<Features>$(Features);FEATURE_CTYPES</Features>
1716
<Features>$(Features);FEATURE_CUSTOM_TYPE_DESCRIPTOR</Features>
1817
<Features>$(Features);FEATURE_EXCEPTION_STATE</Features>
1918
<Features>$(Features);FEATURE_FILESYSTEM</Features>
20-
<Features>$(Features);FEATURE_FULL_CONSOLE</Features>
2119
<Features>$(Features);FEATURE_FULL_CRYPTO</Features>
2220
<Features>$(Features);FEATURE_FULL_NET</Features>
2321
<Features>$(Features);FEATURE_LCG</Features>
@@ -32,7 +30,6 @@
3230
<Features>$(Features);FEATURE_REGISTRY</Features>
3331
<Features>$(Features);FEATURE_RUNTIMEINFORMATION</Features>
3432
<Features>$(Features);FEATURE_SECURITY_RULES</Features>
35-
<Features>$(Features);FEATURE_SERIALIZATION</Features>
3633
<Features>$(Features);FEATURE_STACK_TRACE</Features>
3734
<Features>$(Features);FEATURE_SYNC_SOCKETS</Features>
3835
<Features>$(Features);FEATURE_THREAD</Features>

Build/net9.0-windows.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<PropertyGroup>
3+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
4+
<IntermediateOutputPath Condition=" '$(TargetFramework)' == 'net9.0-windows' ">$(BaseIntermediateOutputPath)$(Configuration)\net9.0</IntermediateOutputPath>
5+
<OutputPath Condition=" '$(TargetFramework)' == 'net9.0-windows' ">$(BaseOutputPath)\net9.0</OutputPath>
6+
</PropertyGroup>
7+
8+
<Import Project="net9.0.props" />
9+
</Project>

Build/net9.0.props

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<IsFullFramework>false</IsFullFramework>
5+
</PropertyGroup>
6+
7+
<PropertyGroup>
8+
<Features>$(Features);FEATURE_APARTMENTSTATE</Features>
9+
<Features>$(Features);FEATURE_ASSEMBLY_GETFORWARDEDTYPES</Features>
10+
<Features>$(Features);FEATURE_ASSEMBLY_RESOLVE</Features>
11+
<Features>$(Features);FEATURE_ASSEMBLYBUILDER_DEFINEDYNAMICASSEMBLY</Features>
12+
<Features>$(Features);FEATURE_CODEDOM</Features>
13+
<Features>$(Features);FEATURE_COM</Features>
14+
<Features>$(Features);FEATURE_CONFIGURATION</Features>
15+
<Features>$(Features);FEATURE_CTYPES</Features>
16+
<Features>$(Features);FEATURE_CUSTOM_TYPE_DESCRIPTOR</Features>
17+
<Features>$(Features);FEATURE_EXCEPTION_STATE</Features>
18+
<Features>$(Features);FEATURE_FILESYSTEM</Features>
19+
<Features>$(Features);FEATURE_FULL_CRYPTO</Features>
20+
<Features>$(Features);FEATURE_FULL_NET</Features>
21+
<Features>$(Features);FEATURE_LCG</Features>
22+
<Features>$(Features);FEATURE_LOADWITHPARTIALNAME</Features>
23+
<Features>$(Features);FEATURE_METADATA_READER</Features>
24+
<Features>$(Features);FEATURE_MMAP</Features>
25+
<Features>$(Features);FEATURE_NATIVE</Features>
26+
<Features>$(Features);FEATURE_OSPLATFORMATTRIBUTE</Features>
27+
<Features>$(Features);FEATURE_PIPES</Features>
28+
<Features>$(Features);FEATURE_PROCESS</Features>
29+
<Features>$(Features);FEATURE_REFEMIT</Features>
30+
<Features>$(Features);FEATURE_REGISTRY</Features>
31+
<Features>$(Features);FEATURE_RUNTIMEINFORMATION</Features>
32+
<Features>$(Features);FEATURE_SECURITY_RULES</Features>
33+
<Features>$(Features);FEATURE_STACK_TRACE</Features>
34+
<Features>$(Features);FEATURE_SYNC_SOCKETS</Features>
35+
<Features>$(Features);FEATURE_THREAD</Features>
36+
<Features>$(Features);FEATURE_XMLDOC</Features>
37+
</PropertyGroup>
38+
</Project>

Build/steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ steps:
3737
version: '6.0.x'
3838

3939
- task: UseDotNet@2
40-
displayName: Install .NET 7.0 SDK for build
40+
displayName: Install .NET 8.0 SDK for build
4141
inputs:
4242
packageType: 'sdk'
43-
version: '7.0.x'
43+
version: '8.0.x'
4444

4545
# Set Mono version on macOS
4646
- ${{ if eq(parameters.os, 'macOS') }}:

IronPython.sln

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.28917.181
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.9.34714.143
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IronPython", "Src\IronPython\IronPython.csproj", "{95289EA9-5778-489D-AB48-F81F2CE2DA32}"
77
EndProject
@@ -37,8 +37,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{17737ACB
3737
Build\net462.props = Build\net462.props
3838
Build\net6.0-windows.props = Build\net6.0-windows.props
3939
Build\net6.0.props = Build\net6.0.props
40-
Build\net7.0-windows.props = Build\net7.0-windows.props
41-
Build\net7.0.props = Build\net7.0.props
40+
Build\net8.0-windows.props = Build\net8.0-windows.props
41+
Build\net8.0.props = Build\net8.0.props
42+
Build\net9.0-windows.props = Build\net9.0-windows.props
43+
Build\net9.0.props = Build\net9.0.props
4244
Build\netcoreapp3.1.props = Build\netcoreapp3.1.props
4345
Build\netstandard2.0.props = Build\netstandard2.0.props
4446
Build\steps.yml = Build\steps.yml

IronPythonAnalyzer/IronPythonAnalyzer/IronPythonAnalyzer.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5+
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
56
</PropertyGroup>
67

78
<ItemGroup>
8-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
9-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.1" PrivateAssets="all" />
9+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="all" />
10+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.10.0" PrivateAssets="all" />
1011
</ItemGroup>
1112

1213
</Project>

0 commit comments

Comments
 (0)