Swashbuckle.Core - Method MapHttpRoute not found
See original GitHub issueI’ve installed Swashbuckle 5.3.2. in my ASP .NET Web API 5.3.2. project. When trying to enable Swagger using the following code
GlobalConfiguration.Configuration.EnableSwagger(c => { c.OperationFilter<ExamplesOperationFilter>(); }).EnableSwaggerUi();
I get the following MissingMethodException
"An exception of type ‘System.MissingMethodException’ occurred in Swashbuckle.Core.dll but was not handled in user code
Additional information: Method not found: ‘System.Web.Http.Routing.IHttpRoute System.Web.Http.HttpRouteCollectionExtensions.MapHttpRoute(System.Web.Http.HttpRouteCollection, System.String, System.String, System.Object, System.Object, System.Net.Http.HttpMessageHandler)’."
I’m not able to find a solution to this specific problem. Any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top GitHub Comments
In order to sort out the issue, was necessary to replace the following binding redirect:
By the next one:
@markus-bergendahl & @markshiffer , Same issue here, Swashbuckle 5.4.0 and AspNet.WebApi 5.2.3. Seems like @markshiffer is right, seems like dll version issue. I fixed it, by added following to my web.config under /configuration/runtime/assemblyBinding/ :