Swashbuckle 4.0.1 is broken on latest bits
See original GitHub issueThis change broke Swashbuckle: https://github.com/aspnet/AspNetCore/commit/4e44025a52e4b73aa17e09a8041b0e166e0c5ce0#diff-82fb21b0c9d40a3f2a763341393fc5e1
Is there anything we can do to make this not be a breaking change?
System.MissingMethodException: 'Method not found: 'Void Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware..ctor(Microsoft.AspNetCore.Http.RequestDelegate, Microsoft.AspNetCore.Hosting.IHostingEnvironment, Microsoft.Extensions.Options.IOptions`1<Microsoft.AspNetCore.Builder.StaticFileOptions>, Microsoft.Extensions.Logging.ILoggerFactory)'.'
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.CreateStaticFileMiddleware(RequestDelegate next, IHostingEnvironment hostingEnv, ILoggerFactory loggerFactory, SwaggerUIOptions options)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware..ctor(RequestDelegate next, IHostingEnvironment hostingEnv, ILoggerFactory loggerFactory, SwaggerUIOptions options)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
at Microsoft.Extensions.Internal.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass4_0.<UseMiddleware>b__0(RequestDelegate next)
at Microsoft.AspNetCore.Builder.Internal.ApplicationBuilder.Build()
at Microsoft.AspNetCore.Hosting.Internal.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at EndpointRouting.Program.Main(String[] args) in C:\git\rynowak\Presentations\2019\Community-Standup-4-22\EndpointRouting\Program.cs:line 16
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Swashbuckle 4.0.1 is broken on latest bits · Issue #9695
MissingMethodException: 'Method not found: 'Void Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware..ctor(Microsoft.AspNetCore.Http.
Read more >Asp.net core swagger not found and server error
I have installed Swashbuckle.AspNetCore version 4.0.1 and tried all solutions and ways. Maybe this is duplicate it's not working in IIS. I ...
Read more >Swashbuckle.AspNetCore 4.0.1
Swagger tools for documenting APIs built on ASP.NET Core. Product, Versions Compatible and additional computed target framework versions.
Read more >Versioning ASP.Net Core APIs with Swashbuckle
Creating a new API with ASP.NET Core is fun and easy; versioning that API is a bit harder. The cinch though is how...
Read more >How to implement Swagger with Authorization
In today's post, our guest blogger Andrew Hinkle explains how to secure the interactive part of Swagger using authorization techniques.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
😢 I’m not sure if an easy way to fix this one. We can leave the old code there and suppress the warning. If we keep the old ctor and try to add the new one then it’ll likely be ambiguos.
cc @Tratcher @glennc
Awesome, thanks for checking back in @alefranz !