Skip to content

Dotnet 10.0.0-preview.7 is failing when --verbosity detailed is added to dotnet search or list command #50564

@poojasrjfrog

Description

@poojasrjfrog

Description

Run command dotnet package search $packageName --verbosity detailed
Gettling below error
:System.InvalidCastException: Specified cast is not valid.
y at System.CommandLine.Binding.ArgumentConverter.ConvertObject(ArgumentResult argumentResult, Type type, Object value)
{ at System.CommandLine.Binding.ArgumentConverter.ConvertIfNeeded(ArgumentConversionResult conversionResult, Type toType)
E at System.CommandLine.Parsing.OptionResult.GetValueOrDefaultT
G at System.CommandLine.Parsing.SymbolResult.GetValue[T](String name)
} at Microsoft.DotNet.Cli.Extensions.ParseResultExtensions.SafelyGetValueForOption[T](ParseResult parseResult, String name)
� at Microsoft.DotNet.Cli.Telemetry.TelemetryFilter.LogVerbosityForAllTopLevelCommand(ICollection1 result, ParseResult parseResult, String topLevelCommandName, Dictionary2 measurements)
S at Microsoft.DotNet.Cli.Telemetry.TelemetryFilter.Filter(Object objectToFilter)
L at Microsoft.DotNet.Cli.Utils.TelemetryEventEntry.SendFiltered(Object o)
T at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime)
7 at Microsoft.DotNet.Cli.Program.Main(String[] args)

Reproduction Steps

Run command dotnet package search $packageName --verbosity detailed
Gettling below error
:System.InvalidCastException: Specified cast is not valid.
y at System.CommandLine.Binding.ArgumentConverter.ConvertObject(ArgumentResult argumentResult, Type type, Object value)
{ at System.CommandLine.Binding.ArgumentConverter.ConvertIfNeeded(ArgumentConversionResult conversionResult, Type toType)
E at System.CommandLine.Parsing.OptionResult.GetValueOrDefaultT
G at System.CommandLine.Parsing.SymbolResult.GetValue[T](String name)
} at Microsoft.DotNet.Cli.Extensions.ParseResultExtensions.SafelyGetValueForOption[T](ParseResult parseResult, String name)
� at Microsoft.DotNet.Cli.Telemetry.TelemetryFilter.LogVerbosityForAllTopLevelCommand(ICollection1 result, ParseResult parseResult, String topLevelCommandName, Dictionary2 measurements)
S at Microsoft.DotNet.Cli.Telemetry.TelemetryFilter.Filter(Object objectToFilter)
L at Microsoft.DotNet.Cli.Utils.TelemetryEventEntry.SendFiltered(Object o)
T at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime)
7 at Microsoft.DotNet.Cli.Program.Main(String[] args)

Expected behavior

Should not throw any error

Actual behavior

Getting below error
Run command dotnet package search $packageName --verbosity detailed
Gettling below error
:System.InvalidCastException: Specified cast is not valid.
y at System.CommandLine.Binding.ArgumentConverter.ConvertObject(ArgumentResult argumentResult, Type type, Object value)
{ at System.CommandLine.Binding.ArgumentConverter.ConvertIfNeeded(ArgumentConversionResult conversionResult, Type toType)
E at System.CommandLine.Parsing.OptionResult.GetValueOrDefaultT
G at System.CommandLine.Parsing.SymbolResult.GetValue[T](String name)
} at Microsoft.DotNet.Cli.Extensions.ParseResultExtensions.SafelyGetValueForOption[T](ParseResult parseResult, String name)
� at Microsoft.DotNet.Cli.Telemetry.TelemetryFilter.LogVerbosityForAllTopLevelCommand(ICollection1 result, ParseResult parseResult, String topLevelCommandName, Dictionary2 measurements)
S at Microsoft.DotNet.Cli.Telemetry.TelemetryFilter.Filter(Object objectToFilter)
L at Microsoft.DotNet.Cli.Utils.TelemetryEventEntry.SendFiltered(Object o)
T at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime)
7 at Microsoft.DotNet.Cli.Program.Main(String[] args)

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

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