Skip to content

Investigate usage of the different CommandResolvers #45251

@baronfel

Description

@baronfel

Is your feature request related to a problem? Please describe.

Command resolution for non-built-in commands goes through a complex resolution process:

compositeCommandResolver.AddCommandResolver(new MuxerCommandResolver());
compositeCommandResolver.AddCommandResolver(new DotnetToolsCommandResolver());
compositeCommandResolver.AddCommandResolver(new LocalToolsCommandResolver(currentWorkingDirectory: currentWorkingDirectory));
compositeCommandResolver.AddCommandResolver(new RootedCommandResolver());
compositeCommandResolver.AddCommandResolver(
new ProjectToolsCommandResolver(packagedCommandSpecFactory, environment));
compositeCommandResolver.AddCommandResolver(new AppBaseDllCommandResolver());
compositeCommandResolver.AddCommandResolver(
new AppBaseCommandResolver(environment, platformCommandSpecFactory));
compositeCommandResolver.AddCommandResolver(
new PathCommandResolver(environment, platformCommandSpecFactory));
compositeCommandResolver.AddCommandResolver(
new PublishedPathCommandResolver(environment, publishedPathCommandSpecFactory));

There are a number of resolvers that could apply to a specific command here, and we have no idea which of these are still in use (though we have suspicions). We should do research and/or add telemetry to help us understand which of these modes are in use (and which can be removed).

Describe the solution you'd like

I'd like to know more about which of these resolvers are used in practice by .NET authors - this would include data about:

  • the name of the command being resolved
  • the name of the resolver that resolved the command

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions