question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swashbuckle 4.0.1 is broken on latest bits

See original GitHub issue

This 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:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
davidfowlcommented, Apr 24, 2019

😢 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

0reactions
analogrelaycommented, Jul 27, 2019

Awesome, thanks for checking back in @alefranz !

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found