# .Net dependency injection in Workflow

**URL:** https://community.temporal.io/t/net-dependency-injection-in-workflow/11920
**Category:** Community Support
**Created:** [April 26, 2024, 4:41pm UTC](https://community.temporal.io/t/net-dependency-injection-in-workflow/11920 "2024-04-26T16:41:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![joao.zacharias](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@joao.zacharias](https://community.temporal.io/u/joao.zacharias)
#### Post date: [April 26, 2024, 4:41pm UTC](https://community.temporal.io/t/net-dependency-injection-in-workflow/11920/1 "2024-04-26T16:41:17Z")

</div>

Hi all, i’m getting an error during start the workflow.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/c/ce4ea6423bd6e5730a1513d4c21058a01cb2f4ea.png)  
Isn’t possible to use dependency injection in workflows? Only in the activities?  
Thanks!

---

<div class="post-metadata">

### Author: ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)
#### Post date: [April 27, 2024, 8:41pm UTC](https://community.temporal.io/t/net-dependency-injection-in-workflow/11920/2 "2024-04-27T20:41:21Z")

</div>

Only in the activities. Injecting dependencies into workflows is too error-prone.
