{"action":"opened","issue":{"url":"https://api.github.com/repos/RSuter/NSwag/issues/1790","repository_url":"https://api.github.com/repos/RSuter/NSwag","labels_url":"https://api.github.com/repos/RSuter/NSwag/issues/1790/labels{/name}","comments_url":"https://api.github.com/repos/RSuter/NSwag/issues/1790/comments","events_url":"https://api.github.com/repos/RSuter/NSwag/issues/1790/events","html_url":"https://github.com/RSuter/NSwag/issues/1790","id":386967043,"node_id":"MDU6SXNzdWUzODY5NjcwNDM=","number":1790,"title":"No service for type 'NSwag.SwaggerGeneration.ISwaggerDocumentProvider' has been registered.","user":{"login":"ranouf","id":1764519,"node_id":"MDQ6VXNlcjE3NjQ1MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1764519?v=4","gravatar_id":"","url":"https://api.github.com/users/ranouf","html_url":"https://github.com/ranouf","followers_url":"https://api.github.com/users/ranouf/followers","following_url":"https://api.github.com/users/ranouf/following{/other_user}","gists_url":"https://api.github.com/users/ranouf/gists{/gist_id}","starred_url":"https://api.github.com/users/ranouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranouf/subscriptions","organizations_url":"https://api.github.com/users/ranouf/orgs","repos_url":"https://api.github.com/users/ranouf/repos","events_url":"https://api.github.com/users/ranouf/events{/privacy}","received_events_url":"https://api.github.com/users/ranouf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-03T19:23:12Z","updated_at":"2018-12-03T19:23:12Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI discovered that the usual tab I use to configure \"Web Api or Asp.Net Core  via Reflection\" is now deprecated. So I tried to configure the new tab \"Asp.Net Core via API explorer\". \r\n\r\nI try to find the how to, I came here :\r\n- https://github.com/RSuter/NSwag/wiki/NSwagStudio\r\n- https://github.com/RSuter/NSwag/wiki/Assembly-loading#net-core\r\n\r\nBut they are not up-to-date, so I tried to make it work by myself:\r\n![image](https://user-images.githubusercontent.com/1764519/49396195-90712a00-f706-11e8-808e-85804e05b6ef.png)\r\n\r\nI created a new branch:\r\nhttps://github.com/ranouf/TestNotification/tree/ISwaggerDocumentProviderError\r\n\r\nFirst time I tried the generate Output button, I have an explicit error message recommending me to execute : `dotnet dev-certs https --trust`\r\n\r\nBut then when I wanted to generate the Output again, now, I have this error:\r\n\r\n> Launcher directory: C:\\Program Files (x86)\\Rico Suter\\NSwagStudio\\NetCore21\r\n> System.InvalidOperationException: Swagger generation failed with non-zero exit code '1'.\r\n> \r\n> Runtime: NetCore21\r\n>    at NSwag.Commands.SwaggerGeneration.AspNetCore.AspNetCoreToSwaggerCommand.RunAsync(CommandLineProcessor processor, IConsoleHost host) in C:\\projects\\nswag\\src\\NSwag.Commands\\Commands\\SwaggerGeneration\\AspNetCore\\AspNetCoreToSwaggerCommand.cs:line 206\r\n>    at NSwag.Commands.NSwagDocumentBase.GenerateSwaggerDocumentAsync() in C:\\projects\\nswag\\src\\NSwag.Commands\\NSwagDocumentBase.cs:line 268\r\n>    at NSwag.Commands.NSwagDocument.ExecuteAsync() in C:\\projects\\nswag\\src\\NSwag.Commands\\NSwagDocument.cs:line 81\r\n>    at NSwag.Commands.Document.ExecuteDocumentCommand.ExecuteDocumentAsync(IConsoleHost host, String filePath) in C:\\projects\\nswag\\src\\NSwag.Commands\\Commands\\Document\\ExecuteDocumentCommand.cs:line 77\r\n>    at NSwag.Commands.Document.ExecuteDocumentCommand.RunAsync(CommandLineProcessor processor, IConsoleHost host) in C:\\projects\\nswag\\src\\NSwag.Commands\\Commands\\Document\\ExecuteDocumentCommand.cs:line 31\r\n>    at NConsole.CommandLineProcessor.ProcessSingleAsync(String[] args, Object input)\r\n>    at NConsole.CommandLineProcessor.ProcessAsync(String[] args, Object input)\r\n>    at NConsole.CommandLineProcessor.Process(String[] args, Object input)\r\n>    at NSwag.Commands.NSwagCommandProcessor.Process(String[] args) in C:\\projects\\nswag\\src\\NSwag.Commands\\NSwagCommandProcessor.cs:line 54\r\n> \r\n> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: **No service for type 'NSwag.SwaggerGeneration.ISwaggerDocumentProvider' has been registered.**\r\n>    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)\r\n>    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)\r\n>    at NSwag.Commands.SwaggerGeneration.AspNetCore.AspNetCoreToSwaggerCommand.GenerateDocumentAsync(AssemblyLoader assemblyLoader, IWebHost host, String currentWorkingDirectory) in C:\\projects\\nswag\\src\\NSwag.Commands\\Commands\\SwaggerGeneration\\AspNetCore\\AspNetCoreToSwaggerCommand.cs:line 251\r\n>    at NSwag.Commands.SwaggerGeneration.AspNetCore.AspNetCoreToSwaggerGeneratorCommandEntryPoint.<>c__DisplayClass0_0.<<Process>b__0>d.MoveNext() in C:\\projects\\nswag\\src\\NSwag.Commands\\Commands\\SwaggerGeneration\\AspNetCore\\AspNetCoreToSwaggerGeneratorCommandEntryPoint.cs:line 30\r\n> --- End of stack trace from previous location where exception was thrown ---\r\n>    at NSwag.Commands.SwaggerGeneration.AspNetCore.AspNetCoreToSwaggerGeneratorCommandEntryPoint.Process(String commandContent, String outputFile, String applicationName) in C:\\projects\\nswag\\src\\NSwag.Commands\\Commands\\SwaggerGeneration\\AspNetCore\\AspNetCoreToSwaggerGeneratorCommandEntryPoint.cs:line 29\r\n>    --- End of inner exception stack trace ---\r\n>    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)\r\n>    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n>    at NSwag.AspNetCore.Launcher.Program.Main(String[] args) in C:\\projects\\nswag\\src\\NSwag.AspNetCore.Launcher\\Program.cs:line 161\r\n> \r\n\r\nWhat did I miss? Do you have a how-to somewhere I can use to configure the new tab?\r\n\r\nThanks @RSuter for your help :)"}}
{"actor":{"display_login":"ranouf"}}