-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Currently when executing my ConsoleApp with added JKToolKit I am getting:
Error: Could not resolve type 'JKToolKit.Spectre.AutoCompletion.Completion.Internals.CompleteCommand'.
Any ideas why that might occur?
My ConsoleApp setup:
/// <summary>
/// Creates a configured CommandApp and builds the DI ServiceProvider.
/// </summary>
/// <returns>
/// Tuple of (CommandApp app, IServiceProvider serviceProvider).
/// The app is fully configured with commands, and the provider is built and ready to resolve services.
/// </returns>
public static (ICommandApp App, IServiceProvider ServiceProvider) Create()
{
// Setup DI container and register services
var services = new ServiceCollection();
// ... adding various services ...
services.AddSingleton<InteractiveCommand>();
// Use a custom TypeRegistrar for Spectre.Console to enable DI
var registrar = new TypeRegistrar(services);
var app = new CommandApp<InteractiveCommand>(registrar); // Default command is InteractiveCommand
services.AddSingleton<ICommandApp>(app);
// Configure command hierarchy and options
app.Configure(config =>
{
config.ValidateExamples(); // ensure examples in help are valid
config.AddAutoCompletion(c => c.AddPowershell());
// ... rest
}
return (app, registrar.BuiltServiceProvider);
}Metadata
Metadata
Assignees
Labels
No labels