Skip to content

Update all sample code to supported .NET Versions - with automation #22271

Closed
@BillWagner

Description

@BillWagner

Our sample projects in all repos (docs, docs-desktop, samples, dotnet-api-docs) where current when they were first created. We didn't (and don't) have a systematic process to update all those projects as older versions move out of support.

Our samples cover many scenarios, some of which rely on code built with older versions. We have a number of scenarios we should support:

  • Samples that should run on the latest version: This is the most common scenario. In general, our samples should be current. By default, they should specify the latest released version of .NET. (Currently, .NET 5).
  • Samples that should run on the most recent LTS version: I haven't identified any in this bucket, but we may have samples that should only be upgraded for new LTS versions.
  • Framework 4.8.2: Some of our samples are specific to .NET framework. Where needed, those should stay on the current release of the .NET Framework.
  • Samples pinned to a version: Some of our samples are pinned to a specific version. These typically are the "start" samples for a migration scenario. They should not be automatically updated. The automation tool should flag them as possible candidates to update by hand, or remove once we decide migration from a given version is no longer needed.
  • Multi-target libraries: Some of our samples use .NET standard 2.0, or support multiple targets. The automation tool should report them for possible by-hand updates. Where possible, we might want to update individual targets for a projects.

It may be that only the first check above can be automated by a tool. If the other scenarios can be identified and reported, we'll learn more about them.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions