.NET Core 3.0中AspectCore的新姿势如何改写,才能实现长尾词效果,提升代码AOP性能?

2026-03-30 13:370阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计602个文字,预计阅读时间需要3分钟。

.NET Core 3.0中AspectCore的新姿势如何改写,才能实现长尾词效果,提升代码AOP性能?

前言:这几天在对EasyCaching做支持.net core 3.0的调整。期间遇到下面这个错误。

System.NotSupportedException: ConfigureServices returning an System.IServiceProvider isn't supported 针对这个问题的解决方案,网上能找到ConfigureServices returning an System.IServiceProvider isn't supported。

前言

这几天在对EasyCaching做支持.net core 3.0的调整。期间遇到下面这个错误。

System.NotSupportedException:“ConfigureServices returning an System.IServiceProvider isn‘t supported

针对这个问题,网上能找到比较多的资料是关于Autofac的,AspectCore的好像比较少。

下面就直接看看简单的处理方法,也在AspectCore上面的Issue回复了。

ServiceProviderFactory的使用

在preview3之后,ConfigureServices方法就不支持直接返回System.IServiceProvider

阅读全文

本文共计602个文字,预计阅读时间需要3分钟。

.NET Core 3.0中AspectCore的新姿势如何改写,才能实现长尾词效果,提升代码AOP性能?

前言:这几天在对EasyCaching做支持.net core 3.0的调整。期间遇到下面这个错误。

System.NotSupportedException: ConfigureServices returning an System.IServiceProvider isn't supported 针对这个问题的解决方案,网上能找到ConfigureServices returning an System.IServiceProvider isn't supported。

前言

这几天在对EasyCaching做支持.net core 3.0的调整。期间遇到下面这个错误。

System.NotSupportedException:“ConfigureServices returning an System.IServiceProvider isn‘t supported

针对这个问题,网上能找到比较多的资料是关于Autofac的,AspectCore的好像比较少。

下面就直接看看简单的处理方法,也在AspectCore上面的Issue回复了。

ServiceProviderFactory的使用

在preview3之后,ConfigureServices方法就不支持直接返回System.IServiceProvider

阅读全文