AspNetCore Could not load type 'Swashbuckle.AspNetCore.SwaggerGen.SwaggerResponseAttribute'

Uninstalling the package

Swashbuckle.AspNetCore.Examples

should fix the issue. The new package is (haven't tried this yet)-

Swashbuckle.AspNetCore.Filters

(UPDATE) The new package works perfectly fine


this worked for us, while upgrading to .netcore 3.0:

1) Install-Package Swashbuckle.AspNetCore -Version 5.0.0-rc4

2) change code to

    public void ConfigureServices(IServiceCollection services)
    {
        ...
        services.AddSwaggerGen(c =>
                {
                    c.SwaggerDoc("v1", new OpenApiInfo { Title = "WebAPI", Version = "v1" });
                });
        ...
    }

    public void Configure(IApplicationBuilder app, IWebHostEnvironment env,ILoggerFactory loggerFactory)
    {
        ...
        app.UseSwagger();
        app.UseSwaggerUI(c =>
        {
            c.RoutePrefix = "swagger/ui";
            c.SwaggerEndpoint("/swagger/v1/swagger.json", "WebAPI(v1)");
        });
        ...
    }

basically, following samples found at https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases/tag/v5.0.0-rc4


Rolling back Swashbuckle.AspNetCore to v2.5.0 did the trick