Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to dotnet 8.0 #3180

Merged
merged 5 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"name": "C# (.NET)",
"image": "mcr.microsoft.com/devcontainers/dotnet:1-7.0-jammy",
"postCreateCommand": "dotnet restore && dotnet build",
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-jammy",
"postCreateCommand": "dotnet build",
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csdevkit"
]
}
}
}
}
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

env:
DOTNET_VERSION: 7.0.x
DOTNET_VERSION: 8.0.x

jobs:

Expand Down Expand Up @@ -35,18 +35,18 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
find tests -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild
dotnet test ./tests/Neo.Cryptography.BLS12_381.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/
dotnet test ./tests/Neo.ConsoleService.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json
dotnet test ./tests/Neo.UnitTests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.net7.0.json
dotnet test ./tests/Neo.VM.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.net7.0.json
dotnet test ./tests/Neo.Json.UnitTests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.net7.0.json /p:CoverletOutputFormat=lcov
dotnet test ./tests/Neo.Cryptography.BLS12_381.Tests --blame-hang --blame-hang-timeout 180000 /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.net8.0.json /p:CoverletOutputFormat=lcov
dotnet test ./tests/Neo.ConsoleService.Tests --blame-hang --blame-hang-timeout 180000 /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.net8.0.json /p:CoverletOutputFormat=lcov
dotnet test ./tests/Neo.UnitTests --blame-hang --blame-hang-timeout 180000 /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.net8.0.json /p:CoverletOutputFormat=lcov
dotnet test ./tests/Neo.VM.Tests --blame-hang --blame-hang-timeout 180000 /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.net8.0.json /p:CoverletOutputFormat=lcov
dotnet test ./tests/Neo.Json.UnitTests --blame-hang --blame-hang-timeout 180000 /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.net8.0.json /p:CoverletOutputFormat=lcov
- name: Coveralls
if: matrix.os == 'ubuntu-latest'
uses: coverallsapp/github-action@v2.2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
format: lcov
file: ${GITHUB_WORKSPACE}/coverage/lcov.net7.0.info
file: ${GITHUB_WORKSPACE}/coverage/lcov.net8.0.info

PublishPackage:
if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Neo.Benchmarks/Neo.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<RootNamespace>Neo</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Neo.VM.Benchmarks/Neo.VM.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<RootNamespace>Neo.VM</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.404",
"version": "8.0.202",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<Copyright>2015-2023 The Neo Project</Copyright>
<VersionPrefix>3.6.2</VersionPrefix>
<LangVersion>11.0</LangVersion>
<LangVersion>12.0</LangVersion>
<Authors>The Neo Project</Authors>
<PackageIcon>neo.png</PackageIcon>
<PackageProjectUrl>https://github.com/neo-project/neo</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/Neo.CLI/Neo.CLI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<AssemblyTitle>Neo.CLI</AssemblyTitle>
<AssemblyName>neo-cli</AssemblyName>
<OutputType>Exe</OutputType>
Expand Down
2 changes: 1 addition & 1 deletion src/Neo.ConsoleService/Neo.ConsoleService.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net7.0;net8.0</TargetFrameworks>
<PackageId>Neo.ConsoleService</PackageId>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<VersionPrefix>0.3.0</VersionPrefix>
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>11.0</LangVersion>
Expand Down
4 changes: 2 additions & 2 deletions src/Neo.Extensions/Neo.Extensions.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net7.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<PackageTags>NEO;Blockchain;Extensions</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Akka" Version="1.5.14" />
<PackageReference Include="Akka" Version="1.5.18" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Neo.GUI/Neo.GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Copyright>2016-2023 The Neo Project</Copyright>
<AssemblyTitle>Neo.GUI</AssemblyTitle>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net7.0-windows</TargetFrameworks>
<TargetFrameworks>net7.0-windows;net8.0-windows</TargetFrameworks>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<RootNamespace>Neo</RootNamespace>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
2 changes: 1 addition & 1 deletion src/Neo.IO/Neo.IO.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net7.0;net8.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<PackageTags>NEO;Blockchain;IO</PackageTags>
Expand Down
4 changes: 2 additions & 2 deletions src/Neo.Json/Neo.Json.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageTags>NEO;JSON</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="8.0.1" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Neo.VM/Neo.VM.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net7.0;net8.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Neo/Neo.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net7.0;net8.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PackageTags>NEO;AntShares;Blockchain;Smart Contract</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Akka" Version="1.5.14" />
<PackageReference Include="Akka" Version="1.5.18" />
<PackageReference Include="BouncyCastle.NetCore" Version="2.2.1" />
<PackageReference Include="K4os.Compression.LZ4" Version="1.3.6" />
<PackageReference Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
Expand Down
17 changes: 0 additions & 17 deletions tests/Directory.Build.props

This file was deleted.

13 changes: 12 additions & 1 deletion tests/Neo.ConsoleService.Tests/Neo.ConsoleService.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<RootNamespace>neo_cli.Tests</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -10,4 +10,15 @@
<ProjectReference Include="..\..\src\Neo.ConsoleService\Neo.ConsoleService.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand All @@ -11,4 +11,15 @@
<ProjectReference Include="..\..\src\Neo.Cryptography.BLS12_381\Neo.Cryptography.BLS12_381.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
</ItemGroup>

</Project>
13 changes: 12 additions & 1 deletion tests/Neo.Json.UnitTests/Neo.Json.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -10,4 +10,15 @@
<ProjectReference Include="..\..\src\Neo.Json\Neo.Json.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
</ItemGroup>

</Project>
17 changes: 14 additions & 3 deletions tests/Neo.UnitTests/Neo.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Akka.TestKit" Version="1.5.14" />
<PackageReference Include="Akka.TestKit.Xunit2" Version="1.5.14" />
<PackageReference Include="Akka.TestKit" Version="1.5.18" />
<PackageReference Include="Akka.TestKit.Xunit2" Version="1.5.18" />
<PackageReference Include="Moq" Version="4.20.70" />
</ItemGroup>

Expand All @@ -23,4 +23,15 @@
<ProjectReference Include="..\..\src\Neo\Neo.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
</ItemGroup>

</Project>
13 changes: 12 additions & 1 deletion tests/Neo.VM.Tests/Neo.VM.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<RootNamespace>Neo.Test</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPackable>false</IsPackable>
Expand All @@ -17,4 +17,15 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
</ItemGroup>

</Project>
Loading