microsoft / testfx

MSTest framework and adapter
MIT License
738 stars 255 forks source link

Platform.MSBuild should allow generating a helper for registration of extensions #3494

Closed Evangelink closed 2 months ago

Evangelink commented 2 months ago

Summary

Generate some test application builder extension that registers all extensions exposing a "hook".

Background and Motivation

Microsoft.Testing.Platform.MSBuild can auto-generate an entry point (Main) in which it will add the registration of all the extensions that define a "hook". We should offer more flexibility by allowing to generate either the entry point or an extension method.

Having this separate extension method will help with:

Proposed Feature

In addition to the flag for generating the platform entry point, let's introduce another flag that allows to generate an extension method for registering the extensions exposing a "hook". I suggest to call this method AddAutoRegisteredExtensions.

Alternative Designs

AB#2201333