From 5f09ed76cfc6f0c4478ffd1ee46518c2170447e7 Mon Sep 17 00:00:00 2001 From: Martin-Molinero Date: Tue, 3 May 2022 11:35:37 -0300 Subject: [PATCH] Update to net6.0 --- lean/components/docker/lean_runner.py | 5 ++--- lean/components/util/project_manager.py | 3 +-- tests/commands/test_backtest.py | 3 +-- tests/components/config/test_project_config_manager.py | 6 ++---- tests/test_helpers.py | 3 +-- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/lean/components/docker/lean_runner.py b/lean/components/docker/lean_runner.py index 04b4a094..32255134 100644 --- a/lean/components/docker/lean_runner.py +++ b/lean/components/docker/lean_runner.py @@ -289,7 +289,7 @@ def get_basic_docker_config(self, # Create a C# project used to resolve the dependencies of the modules run_options["commands"].append("mkdir /ModulesProject") run_options["commands"].append("dotnet new sln -o /ModulesProject") - run_options["commands"].append("dotnet new classlib -o /ModulesProject -f net5.0 --no-restore") + run_options["commands"].append("dotnet new classlib -o /ModulesProject -f net6.0 --no-restore") run_options["commands"].append("rm /ModulesProject/Class1.cs") # Add all modules to the project, automatically resolving all dependencies @@ -450,8 +450,7 @@ def set_up_csharp_options(self, project_dir: Path, run_options: Dict[str, Any], msbuild_properties = { "Configuration": "Release" if release else "Debug", "Platform": "AnyCPU", - "TargetFramework": "net5.0", - "LangVersion": "9", + "TargetFramework": "net6.0", "OutputPath": "/Compile/bin", "GenerateAssemblyInfo": "false", "GenerateTargetFrameworkAttribute": "false", diff --git a/lean/components/util/project_manager.py b/lean/components/util/project_manager.py index 419c4960..2e6838b6 100644 --- a/lean/components/util/project_manager.py +++ b/lean/components/util/project_manager.py @@ -389,8 +389,7 @@ def _generate_csproj(self, project_dir: Path) -> None: Debug AnyCPU - net5.0 - 9 + net6.0 bin/$(Configuration) false $(DefaultItemExcludes);backtests/*/code/**;live/*/code/**;optimizations/*/code/** diff --git a/tests/commands/test_backtest.py b/tests/commands/test_backtest.py index fd114d24..e3c6a125 100644 --- a/tests/commands/test_backtest.py +++ b/tests/commands/test_backtest.py @@ -513,8 +513,7 @@ def test_backtest_auto_updates_outdated_csharp_csproj() -> None: Debug AnyCPU - net5.0 - 9 + net6.0 bin/$(Configuration) false CS0618 diff --git a/tests/components/config/test_project_config_manager.py b/tests/components/config/test_project_config_manager.py index 8693be4b..bd69230f 100644 --- a/tests/components/config/test_project_config_manager.py +++ b/tests/components/config/test_project_config_manager.py @@ -60,8 +60,7 @@ def test_get_csharp_libraries_returns_all_libraries_in_package_reference_tags_in Debug AnyCPU - net5.0 - 9 + net6.0 bin/$(Configuration) false CS0618 @@ -100,8 +99,7 @@ def test_get_csharp_libraries_skips_invalid_package_reference_tags() -> None: Debug AnyCPU - net5.0 - 9 + net6.0 bin/$(Configuration) false CS0618 diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 8887803c..14e2ba78 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -49,8 +49,7 @@ def create_fake_lean_cli_directory() -> None: Debug AnyCPU - net5.0 - 9 + net6.0 bin/$(Configuration) false CS0618