Log exception when app fails to start in CLI#3853
Merged
martincostello merged 3 commits intodomaindrivendev:masterfrom Mar 19, 2026
Merged
Log exception when app fails to start in CLI#3853martincostello merged 3 commits intodomaindrivendev:masterfrom
martincostello merged 3 commits intodomaindrivendev:masterfrom
Conversation
…agger cli execution
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3853 +/- ##
=======================================
Coverage 94.95% 94.95%
=======================================
Files 111 111
Lines 3886 3886
Branches 783 783
=======================================
Hits 3690 3690
Misses 196 196
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
martincostello
approved these changes
Mar 19, 2026
Rename `exception` to `ex`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a misleading logging that happens under the following conditions:
We receive an error like the following:
AI.Crawl.Client -> C:\Users\oldukhno\work\Invictus\artifacts\bin\AI.Crawl.Client\debug_net10.0\AI.Crawl.Client.dll
b__1_5(IDictionaryAI.Search.Services.Internal -> C:\Users\oldukhno\work\Invictus\artifacts\bin\AI.Search.Services.Internal\debug_net10.0\AI.Search.Services.Internal.dll
AI.Search.Services.Agents.Foundry -> C:\Users\oldukhno\work\Invictus\artifacts\bin\AI.Search.Services.Agents.Foundry\debug_net10.0\AI.Search.Services.Agents.Foundry.dll
AI.Search.Host -> C:\Users\oldukhno\work\Invictus\artifacts\bin\AI.Search.Host\debug\AI.Search.Host.dll
Unhandled exception. System.InvalidOperationException: A type named 'StartupDevelopment' or 'Startup' could not be found in assembly 'AI.Search.Host'.
at Microsoft.AspNetCore.Hosting.StartupLoader.FindStartupType(String startupAssemblyName, String environmentName)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.ScanAssemblyAndRegisterStartup(HostBuilderContext context, IServiceCollection services, WebHostBuilderContext webhostContext, WebHostOptions webHostOptions)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<.ctor>b__4_2(HostBuilderContext context, IServiceCollection services)
at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Swashbuckle.AspNetCore.Cli.Program.GetServiceProvider(Assembly startupAssembly) in //src/Swashbuckle.AspNetCore.Cli/Program.cs:line 257
at Swashbuckle.AspNetCore.Cli.Program.SetupAndRetrieveSwaggerProviderAndOptions(IDictionary
2 namedArgs, ISwaggerProvider& swaggerProvider, IOptions1& swaggerOptions) in //src/Swashbuckle.AspNetCore.Cli/Program.cs:line 195at Swashbuckle.AspNetCore.Cli.Program.<>c.
2 namedArgs) in /_/src/Swashbuckle.AspNetCore.Cli/Program.cs:line 65 at Swashbuckle.AspNetCore.Cli.CommandRunner.Run(IEnumerable1 args) in //src/Swashbuckle.AspNetCore.Cli/CommandRunner.cs:line 56at Swashbuckle.AspNetCore.Cli.CommandRunner.Run(IEnumerable`1 args) in //src/Swashbuckle.AspNetCore.Cli/CommandRunner.cs:line 47
at Swashbuckle.AspNetCore.Cli.Program.Main(String[] args) in /_/src/Swashbuckle.AspNetCore.Cli/Program.cs:line 189
C:\Users\oldukhno\work\Invictus\src\hosts\AI.Search.Host\AI.Search.Host.csproj(72,5): error MSB3073:
The command "dotnet swagger tofile --output "C:\Users\oldukhno\work\Invictus\src\hosts\AI.Search.Host/../../clients/AI.Search.Client/swagger.json" "C:\Users\oldukhno\work\Invictus\artifacts\bin\AI.Search.Host\debug\AI.Search.Host.dll" v1" exited with code -532462766.
This is misleading and hiding the actual issue. We had better output the error message to stderr instead just swallowing it.