Skip to content

Centralize TargetFrameworks definition via shared build.props #610

@askpt

Description

@askpt

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

Metadata

Metadata

Assignees

Labels

area: sdkThis issue or pull request relates to an SDKtype: refactorA code change that neither fixes a bug nor adds a feature

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions