Skip to main content

Command Palette

Search for a command to run...

How to use IHttpContextAccessor in library project ?

Updated
1 min read
How to use IHttpContextAccessor in library project ?

Maybe you already encounter this problem. You want to use the IHttpContextAccessor but it is not available and there is no indication to find the right package to use.

To solve this situation, you just have to use the Microsoft.AspNetCore.Http.Abstractions package

That’s all folks™ !


Let's Connect!

Hi, I'm Yoann. I work as a full-stack developer, solution architect.

If you enjoyed this article, you might enjoy my other content, too.

Github: yblossier

LinkedIn: /in/yoannblossier

Buy Me A Coffee: A special thank you for your support 🍵

Thank you for joining me today.

Yoann