From 62d7735d5cfc91b9cda592d4d37dd47e06b52db0 Mon Sep 17 00:00:00 2001 From: Victor Nova Date: Tue, 23 Nov 2021 10:26:07 -0800 Subject: [PATCH] use .NET 6.0 LTS and C# 10 --- .github/workflows/main.yml | 2 ++ .github/workflows/nuget-preview.yml | 2 ++ Directory.Build.props | 6 +++--- pythonnet.sln | 16 ++-------------- src/console/Console.csproj | 2 +- src/embed_tests/Python.EmbeddingTest.csproj | 2 +- .../Python.PythonTestsRunner.csproj | 2 +- src/runtime/Python.Runtime.csproj | 2 +- src/testing/Python.Test.csproj | 2 +- tests/conftest.py | 2 +- 10 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 61920bd34..53a0f3701 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,6 +31,8 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 diff --git a/.github/workflows/nuget-preview.yml b/.github/workflows/nuget-preview.yml index 40071983d..025210bec 100644 --- a/.github/workflows/nuget-preview.yml +++ b/.github/workflows/nuget-preview.yml @@ -25,6 +25,8 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Set up Python 3.8 uses: actions/setup-python@v2 diff --git a/Directory.Build.props b/Directory.Build.props index e0cd93ede..0f89af489 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,15 +1,15 @@ 3.0.0 - Copyright (c) 2006-2020 The Contributors of the Python.NET Project + Copyright (c) 2006-2021 The Contributors of the Python.NET Project pythonnet Python.NET - 9.0 + 10.0 false - + all runtime; build; native; contentfiles; analyzers diff --git a/pythonnet.sln b/pythonnet.sln index 4ca4fb285..5cf1d1cce 100644 --- a/pythonnet.sln +++ b/pythonnet.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30717.126 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31912.275 MinimumVisualStudioVersion = 15.0.26124.0 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.Runtime", "src\runtime\Python.Runtime.csproj", "{4E8C8FE2-0FB8-4517-B2D9-5FB2D5FC849B}" EndProject @@ -80,18 +80,6 @@ Global {E6B01706-00BA-4144-9029-186AC42FBE9A}.Release|x64.Build.0 = Release|x64 {E6B01706-00BA-4144-9029-186AC42FBE9A}.Release|x86.ActiveCfg = Release|x86 {E6B01706-00BA-4144-9029-186AC42FBE9A}.Release|x86.Build.0 = Release|x86 - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|x64.ActiveCfg = Debug|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|x64.Build.0 = Debug|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|x86.ActiveCfg = Debug|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|x86.Build.0 = Debug|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|Any CPU.Build.0 = Release|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|x64.ActiveCfg = Release|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|x64.Build.0 = Release|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|x86.ActiveCfg = Release|Any CPU - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|x86.Build.0 = Release|Any CPU {819E089B-4770-400E-93C6-4F7A35F0EA12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {819E089B-4770-400E-93C6-4F7A35F0EA12}.Debug|Any CPU.Build.0 = Debug|Any CPU {819E089B-4770-400E-93C6-4F7A35F0EA12}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/src/console/Console.csproj b/src/console/Console.csproj index 08854cfc9..bcbc1292b 100644 --- a/src/console/Console.csproj +++ b/src/console/Console.csproj @@ -1,6 +1,6 @@ - net472;netcoreapp3.1 + net472;net6.0 x64;x86 Exe nPython diff --git a/src/embed_tests/Python.EmbeddingTest.csproj b/src/embed_tests/Python.EmbeddingTest.csproj index 67a7d3338..a9c271f91 100644 --- a/src/embed_tests/Python.EmbeddingTest.csproj +++ b/src/embed_tests/Python.EmbeddingTest.csproj @@ -1,7 +1,7 @@ - net472;netcoreapp3.1 + net472;net6.0 ..\pythonnet.snk true diff --git a/src/python_tests_runner/Python.PythonTestsRunner.csproj b/src/python_tests_runner/Python.PythonTestsRunner.csproj index 1006b2148..63981c424 100644 --- a/src/python_tests_runner/Python.PythonTestsRunner.csproj +++ b/src/python_tests_runner/Python.PythonTestsRunner.csproj @@ -1,7 +1,7 @@ - net472;netcoreapp3.1 + net472;net6.0 diff --git a/src/runtime/Python.Runtime.csproj b/src/runtime/Python.Runtime.csproj index 587408edd..ca4ee6dc7 100644 --- a/src/runtime/Python.Runtime.csproj +++ b/src/runtime/Python.Runtime.csproj @@ -2,7 +2,7 @@ netstandard2.0 AnyCPU - 9.0 + 10.0 Python.Runtime Python.Runtime diff --git a/src/testing/Python.Test.csproj b/src/testing/Python.Test.csproj index f7bc10bb4..78f3a3169 100644 --- a/src/testing/Python.Test.csproj +++ b/src/testing/Python.Test.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net5.0 + netstandard2.0;net6.0 true true diff --git a/tests/conftest.py b/tests/conftest.py index 0361830d6..99ee07f2f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -50,7 +50,7 @@ def pytest_configure(config): # tmpdir_factory.mktemp(f"pythonnet-{runtime_opt}") - fw = "net5.0" if runtime_opt == "netcore" else "netstandard2.0" + fw = "net6.0" if runtime_opt == "netcore" else "netstandard2.0" check_call(["dotnet", "publish", "-f", fw, "-o", bin_path, test_proj_path])