Open czhrf opened 2 weeks ago
请提供下插件版本,以及 PluginCore 相关包版本,有无对 PluginCore 做自定义替换内部
使用的plugin目录中的插件HelloWorldPlugin,控制器做了修改 方法头增加了[HttpGet],其他代码没有变更
使用的plugin目录中的插件HelloWorldPlugin,控制器做了修改 方法头增加了[HttpGet],其他代码没有变更
尝试更新 Hellowworldplugin 里引用的plugincore到最新, 以及你确定是启用插件时报错,而不是访问某个插件api路径
建议参考 KnifeHub 里的插件,这个仓库里的插件太久没更新了
启用插件异常 PluginCore.AspNetCore.Middlewares.PluginStartupXMiddleware[0] PluginCore: Unable to resolve service for type 'PluginCore.Interfaces.IPluginFinder' while attempting to Invoke middleware 'HelloWorldPlugin.Middlewares.SayHelloMiddleware'. System.InvalidOperationException: Unable to resolve service for type 'PluginCore.Interfaces.IPluginFinder' while attempting to Invoke middleware 'HelloWorldPlugin.Middlewares.SayHelloMiddleware'. at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.GetService(IServiceProvider sp, Type type, Type middleware) at lambda_method27(Closure , Object , HttpContext , IServiceProvider ) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.b__2(HttpContext context)
at PluginCore.AspNetCore.Middlewares.PluginStartupXMiddleware.InvokeAsync(HttpContext httpContext, IPluginApplicationBuilderManager pluginApplicationBuilderManager) in F:\PluginCore\src\PluginCore.AspNetCore\Middlewares\PluginStartupXMiddleware.cs:line 44