unchase / Unchase.Swashbuckle.AspNetCore.Extensions

:hammer: A library contains a bunch of extensions (filters) for Swashbuckle.AspNetCore.
https://www.nuget.org/packages/Unchase.Swashbuckle.AspNetCore.Extensions
Apache License 2.0
116 stars 17 forks source link

smth wrong. err #1

Closed ayazzali closed 5 years ago

ayazzali commented 5 years ago
2019-10-08 00:07:24.0967|INFO|Microsoft.AspNetCore.Hosting.Internal.WebHost|Requ
est starting HTTP/1.1 GET https://localhost:5001/swagger/index.html  |
fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HLQBD9CELIBQ", Request id "0HLQBD9CELIBQ:00000001": An unh
andled exception was thrown by the application.
System.TypeLoadException: Method 'Apply' in type 'Unchase.Swashbuckle.AspNetCore
.Extensions.Filters.DisplayEnumsWithValuesDocumentFilter' from assembly 'Unchase
.Swashbuckle.AspNetCore.Extensions, Version=1.1.1.0, Culture=neutral, PublicKeyT
oken=null' does not have an implementation.
   at RestApi.Startup.<>c.<ConfigureServices>b__4_1(SwaggerGenOptions f)
   at Microsoft.Extensions.Options.ConfigureNamedOptions`1.Configure(String name
, TOptions options)
   at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
   at Microsoft.Extensions.Options.OptionsManager`1.<>c__DisplayClass5_0.<Get>b_
_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication,
Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd(String name, Func`1 c
reateOptions)
   at Microsoft.Extensions.Options.OptionsManager`1.Get(String name)
   at Microsoft.Extensions.Options.OptionsManager`1.get_Value()
   at Swashbuckle.AspNetCore.SwaggerGen.ConfigureSchemaGeneratorOptions..ctor(IS
erviceProvider serviceProvider, IOptions`1 swaggerGenOptionsAccessor)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, ServiceProviderEng
ineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope
)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProvi
derEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope s
cope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngi
ne.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngine
Scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngi
neScope.GetService(Type serviceType)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.GetService(IServicePr
ovider sp, Type type, Type middleware)
   at lambda_method(Closure , Object , HttpContext , IServiceProvider )
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass4_1.
<UseMiddleware>b__2(HttpContext context)
   at Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware.Invoke(HttpCont
ext context)
   at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.I
nvoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Hosting.Internal.HostingApplication.ProcessRequestAsy
nc(Context context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.Proces
sRequests[TContext](IHttpApplication`1 application)
2019-10-08 00:07:24.3049|ERROR|Microsoft.AspNetCore.Server.Kestrel|Connection id
 "0HLQBD9CELIBQ", Request id "0HLQBD9CELIBQ:00000001": An unhandled exception wa
s thrown by the application.|System.TypeLoadException: Method 'Apply' in type 'U
nchase.Swashbuckle.AspNetCore.Extensions.Filters.DisplayEnumsWithValuesDocumentF
ilter' from assembly 'Unchase.Swashbuckle.AspNetCore.Extensions, Version=1.1.1.0
, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at RestApi.Startup.<>c.<ConfigureServices>b__4_1(SwaggerGenOptions f)
   at Microsoft.Extensions.Options.ConfigureNamedOptions`1.Configure(String name
, TOptions options)
   at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
   at Microsoft.Extensions.Options.OptionsManager`1.<>c__DisplayClass5_0.<Get>b_
_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication,
Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd(String name, Func`1 c
reateOptions)
   at Microsoft.Extensions.Options.OptionsManager`1.Get(String name)
   at Microsoft.Extensions.Options.OptionsManager`1.get_Value()
   at Swashbuckle.AspNetCore.SwaggerGen.ConfigureSchemaGeneratorOptions..ctor(IS
erviceProvider serviceProvider, IOptions`1 swaggerGenOptionsAccessor)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, ServiceProviderEng
ineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope
)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEn
gineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeReso
lver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineSc
ope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.V
isitCallSite(IServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProvi
derEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope s
cope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngi
ne.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngine
Scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngi
neScope.GetService(Type serviceType)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.GetService(IServicePr
ovider sp, Type type, Type middleware)
   at lambda_method(Closure , Object , HttpContext , IServiceProvider )
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass4_1.
<UseMiddleware>b__2(HttpContext context)
   at Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware.Invoke(HttpCont
ext context)
   at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.I
nvoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Hosting.Internal.HostingApplication.ProcessRequestAsy
nc(Context context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.Proces
sRequests[TContext](IHttpApplication`1 application)
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 279.8744ms 500
2019-10-08 00:07:24.3760|INFO|Microsoft.AspNetCore.Hosting.Internal.WebHost|Requ
est finished in 279.8744ms 500 |

netcoreapp2.1 lib v 1.1.1

unchase commented 5 years ago

I was not able to reproduce the issue, it should not occur.