# The "SetEnv" task failed unexpectedly

**URL:** <https://forums.unrealengine.com/t/the-setenv-task-failed-unexpectedly/2675115>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [November 14, 2025, 3:17pm UTC](https://forums.unrealengine.com/t/the-setenv-task-failed-unexpectedly/2675115 "2025-11-14T15:17:07Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![4narchyBandid0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@4narchyBandid0](https://forums.unrealengine.com/u/4narchyBandid0)\
**Post date:** [November 16, 2025, 3:54am UTC](https://forums.unrealengine.com/t/the-setenv-task-failed-unexpectedly/2675115/5 "2025-11-16T03:54:09Z")

</div>

As a workaround, I deleted the Include Directories field set up in the generated solution file, as described here: [Unreal Engine 4.25 source code compile error](https://forums.unrealengine.com/t/unreal-engine-4-25-source-code-compile-error/141849)

This fixes the build, but has the unfortunate side effect that Intellisense suddenly doesn’t know where to look for any engine includes, so it starts flagging all your code with red squigglies.

---

_[View the full topic](https://forums.unrealengine.com/t/the-setenv-task-failed-unexpectedly/2675115)._
