Requirements
Currently, each csproj file in the src folder includes the following line:
<TargetFrameworks>netstandard2.0;net8.0;net9.0;net462</TargetFrameworks>
To improve maintainability and reduce duplication, we should centralize this TargetFrameworks definition in the shared Directory.Build.props file that all projects can import. This will make it easier to update target frameworks for all projects in the future and promote consistency across the solution.
Proposed changes:
- Update the shared
Directory.Build.props file in the repository root.
- Move the
TargetFrameworks property to this file.
- Remove the duplicated
TargetFrameworks line from each csproj in the src folder and ensure they import the shared props.
- Verify that all projects build successfully after the change.
Benefits:
- Easier to update supported frameworks in one place
- Reduced risk of inconsistencies
- Cleaner project files
Requirements
Currently, each csproj file in the src folder includes the following line:
To improve maintainability and reduce duplication, we should centralize this TargetFrameworks definition in the shared
Directory.Build.propsfile that all projects can import. This will make it easier to update target frameworks for all projects in the future and promote consistency across the solution.Proposed changes:
Directory.Build.propsfile in the repository root.TargetFrameworksproperty to this file.TargetFrameworksline from each csproj in the src folder and ensure they import the shared props.Benefits: