Skip to content
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
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