Missing TaskCache class in .NET Core 2
Asked Answered
G

1

6

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?

Gui answered 23/8, 2017 at 12:8 Comment(0)
L
11

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

Lore answered 23/8, 2017 at 12:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.