-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[Developer Experience] Target Framework validation #57596
Description
Summary
The Azure SDK engineering system defines a common set of targets that should be used for libraries. While different packages may have different needs, the scenarios should be covered by a pre-defined target variable. We'll want to ensure that we are validating all libraries are using the configured targets and not hardcoding a custom set. Because target frameworks are mandated by the Azure SDK for .NET guidelines, we'll also want to be sure that any customizations in library pull requests require review from the Azure SDK team.
Scope
-
Ensure that any customization to
<RequiredTargetFrameworks>or<TargetFrameworks>in a project file are validated. These should use only a set defined in Directory.Build.Common.props and not a custom set. -
Ensure that
<RequiredTargetFrameworks>and<TargetFrameworks>are present in the project file. -
Ensure that
<TargetFramework>is not present in the project file.
Out of scope
- Do not validate stand-alone samples in the root
/samplesarea. These must use hard-coded targets to build outside of the repository.
Success criteria
- Pull requests that do not have the required target framework elements are flagged as invalid.
- Pull requests that do not use a pre-defined target set are flagged as invalid.
- If any customization to
<RequiredTargetFrameworks>or<TargetFrameworks>takes place in a pull request, the Azure SDK team should be added as reviewers or mentioned in a comment. - When a pull request fails validation, a comment that details what needs to happen to correct this.