Skip to content

Commit

Permalink
Merge pull request #90 from QuantConnect/feature-6254-net-6
Browse files Browse the repository at this point in the history
Update to net6.0
  • Loading branch information
Martin-Molinero authored May 3, 2022
2 parents 874772b + 5f09ed7 commit 33514aa
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
5 changes: 2 additions & 3 deletions lean/components/docker/lean_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions lean/components/util/project_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,7 @@ def _generate_csproj(self, project_dir: Path) -> None:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>bin/$(Configuration)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<DefaultItemExcludes>$(DefaultItemExcludes);backtests/*/code/**;live/*/code/**;optimizations/*/code/**</DefaultItemExcludes>
Expand Down
3 changes: 1 addition & 2 deletions tests/commands/test_backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,7 @@ def test_backtest_auto_updates_outdated_csharp_csproj() -> None:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>bin/$(Configuration)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<NoWarn>CS0618</NoWarn>
Expand Down
6 changes: 2 additions & 4 deletions tests/components/config/test_project_config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ def test_get_csharp_libraries_returns_all_libraries_in_package_reference_tags_in
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>bin/$(Configuration)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<NoWarn>CS0618</NoWarn>
Expand Down Expand Up @@ -100,8 +99,7 @@ def test_get_csharp_libraries_skips_invalid_package_reference_tags() -> None:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>bin/$(Configuration)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<NoWarn>CS0618</NoWarn>
Expand Down
3 changes: 1 addition & 2 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ def create_fake_lean_cli_directory() -> None:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<OutputPath>bin/$(Configuration)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<NoWarn>CS0618</NoWarn>
Expand Down

0 comments on commit 33514aa

Please sign in to comment.