Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing TaskCache class in .NET Core 2

I have created a Custom Model Binder in .NET Core 1.x . It works well as shown in the official tutorial.

Once updated to 2.0, I can't compile it anymore. In the old version it was

return TaskCache.CompletedTask; 

Now the TaskCache static class isn't available anymore.

Does any know a workaround?

like image 504
norbinto Avatar asked Aug 23 '17 12:08

norbinto


1 Answers

TaskCache.CompletedTask was removed in .Net Core 2. Instead just use Task.CompletedTask.

like image 111
DavidG Avatar answered Sep 21 '22 17:09

DavidG