Upgrade projects to target .NET 10, add conditional System.Linq.Async dependencies for compatibility with earlier frameworks, and update project files for consistency across the solution. (#7062)
* Upgrade projects to target .NET 10, add conditional `System.Linq.Async` dependencies for compatibility with earlier frameworks, and update project files for consistency across the solution. * Suppress null comparison warning in `WorkflowDefinitionStore` and remove xUnit references from performance test project. * Refactor performance test projects to remove xUnit references and update MSBuild properties for BenchmarkDotNet.
This commit is contained in:
parent
5655192fb6
commit
2f9eac110e
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
|
||||
|
||||
<PropertyGroup Label="TargetFrameworks">
|
||||
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
|
||||
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Label="Files">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Jint" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- System.Linq.Async only for .NET 8 and 9 - .NET 10 has native async LINQ support -->
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'net10.0'">
|
||||
<PackageReference Include="System.Linq.Async" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -221,7 +221,9 @@ public class EFCoreWorkflowDefinitionStore(EntityStore<ManagementElsaDbContext,
|
|||
if (filter.IsSystem != null)
|
||||
queryable = filter.IsSystem == true
|
||||
? queryable.Where(x => x.IsSystem == true)
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
: queryable.Where(x => x.IsSystem == false || x.IsSystem == null!);
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (filter.IsReadonly != null) queryable = queryable.Where(x => x.IsReadonly == filter.IsReadonly);
|
||||
return queryable;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@
|
|||
<PackageReference Include="Microsoft.Extensions.Options" />
|
||||
<PackageReference Include="Newtonsoft.Json" />
|
||||
<PackageReference Include="ShortGuid" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- System.Linq.Async only for .NET 8 and 9 - .NET 10 has native async LINQ support -->
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'net10.0'">
|
||||
<PackageReference Include="System.Linq.Async" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Include>[Elsa.Workflows.Core]*</Include>
|
||||
<Threshold>25</Threshold>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Include>[Elsa.Expressions.JavaScript]*</Include>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Include>[Elsa.Resilience]*,[Elsa.Http]*,[Elsa.Workflows.Core]*</Include>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,37 @@
|
|||
<Project>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
<OutputType>Exe</OutputType>
|
||||
<CollectCoverage>false</CollectCoverage>
|
||||
<!-- This is a BenchmarkDotNet performance test, not an xUnit test -->
|
||||
<IsTestProject>false</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Remove xUnit packages inherited from test/Directory.Build.props -->
|
||||
<ItemGroup>
|
||||
<PackageReference Remove="Microsoft.NET.Test.Sdk"/>
|
||||
<PackageReference Remove="xunit"/>
|
||||
<PackageReference Remove="xunit.runner.visualstudio"/>
|
||||
<PackageReference Remove="Microsoft.AspNetCore.Mvc.Testing"/>
|
||||
<PackageReference Remove="Moq"/>
|
||||
<PackageReference Remove="NSubstitute"/>
|
||||
<PackageReference Remove="coverlet.msbuild"/>
|
||||
<PackageReference Remove="coverlet.collector"/>
|
||||
<PackageReference Remove="GitHubActionsTestLogger"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Remove xUnit usings -->
|
||||
<ItemGroup>
|
||||
<Using Remove="Xunit"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,14 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<OutputType>Exe</OutputType>
|
||||
<CollectCoverage>false</CollectCoverage>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\modules\Elsa\Elsa.csproj" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue