# 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**](https://www.nuget.org/packages/Microsoft.AspNetCore.Http.Abstractions) package

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1760218057667/ec21db59-4651-401b-9e8a-98b06b400b54.png align="center")

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**](https://github.com/yblossier)

**LinkedIn:** [**/in/yoannblossier**](https://linkedin.com/in/yoannblossier)

**Buy Me A Coffee:** [**A special thank you for your support**](https://www.buymeacoffee.com/yoannblossier) **🍵**

Thank you for joining me today.

Yoann
