ITADN

InvalidOperationException using `--trusted-signing-endpoint <Uri>`

#965Closedbgrainger 创建于 2026-01-12
B
bgraingercommented
**Describe the bug** The `-tse`/`--trusted-signing-endpoint` command line option no longer accepts a URI. **Repro steps** Build the latest code from `main`. Run: ``` dotnet .\artifacts\bin\Sign.Cli\Debug\net8.0\win-x64\sign.dll code trusted-signing -tse https://wus2.codesigning.azure.net/ -tsa YOUR_ACCOUNT -tscp YOUR_PROFILE -fd sha256 -t http://timestamp.acs.microsoft.com -td sha256 .\artifacts\bin\Sign.Cli\Debug\net8.0\win-x64\sign.dll ``` **Expected behavior** The endpoint is used for trusted signing. **Actual behavior** An `InvalidOperationException` is thrown: ``` Unhandled exception: System.InvalidOperationException: Cannot parse argument 'https://wus2.codesigning.azure.net/' for option '--trusted-signing-endpoint' as expected type 'System.Uri'. at System.CommandLine.Binding.ArgumentConverter.GetValueOrDefault[T](ArgumentConversionResult result) at System.CommandLine.Parsing.OptionResult.GetValueOrDefault[T]() at System.CommandLine.Parsing.SymbolResult.GetValue[T](Option`1 option) at System.CommandLine.ParseResult.GetValue[T](Option`1 option) at Sign.Cli.TrustedSigningCommand.<>c__DisplayClass15_0.<.ctor>b__0(ParseResult parseResult, CancellationToken cancellationToken) in C:\Code\sign\src\Sign.CLI\TrustedSigningCommand.cs:line 80 at System.CommandLine.Invocation.AnonymousAsynchronousCommandLineAction.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken) at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken) ``` **Additional context** - Include the output of `sign --version`: 0.9.1-dev - Add any other context about the problem here. I suspect this was introduced in https://github.com/dotnet/sign/commit/c940e04e7e8d5a509cc03583bf842f3654b5a67e; #959.
关闭于 2026-01-20 0 条评论