Last post Sep 25, 2018 05:08 PM by saigkill
Sep 25, 2018 11:01 AM|saigkill|LINK
currently i'm learning ASP.NET Core and have a little problem. I have started a new ASP.NET Core project with Visual Studio and trying to build a BlogEngine with
So i'm getting now a error "IServiceCollection has no definition of AddCaching". But how to fix it?
My Project on Github is available
Sep 25, 2018 01:55 PM|DA924|LINK
In your StartUp.cs, you have a services.AddCaching(). What is that about, since IServiceCollection that you have no control over has no method implementation for it? It seems that you need to remove the line.
Sep 25, 2018 02:47 PM|Xing Zou|LINK
The method got renamed to AddMemoryCache. In startup.cs, try to use below code instead of services.AddCaching().
You could refer to below github issue:
Sep 25, 2018 05:08 PM|saigkill|LINK
Hi Xing Zou,
thank you very much. AddMemoryCache does the job :-)