When i am deploying on server below exception is coming
Method not found: 'Swashbuckle.Application.SwaggerEnabledConfiguration Swashbuckle.Application.HttpConfigurationExtensions.EnableSwagger(System.Web.Http.HttpConfiguration, System.Action`1
Meanwhile it is working good in local IIS.
Maybe this can help you: https://github.com/domaindrivendev/Swashbuckle/issues/451
I ran into this same issue. I just posted a comment on #451 on what I did to resolve it.
My fix for this issue came from this thread:
Different problem, but same fix
This is what I did to resolve it #451
I fixed this on my local IIS by adding a binding redirect for System.Net.Http in web.config.
Just make sure the 4.2.0.0 below matches the version of the DLL in your references folder.
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0"/>
</dependentAssembly>
That worked
Most helpful comment
I fixed this on my local IIS by adding a binding redirect for System.Net.Http in web.config.
Just make sure the 4.2.0.0 below matches the version of the DLL in your references folder.