# Cant compile fresh c++ project: Nuget vulnerability on UE 5.6.1 on fresh installation

**URL:** <https://forums.unrealengine.com/t/cant-compile-fresh-c-project-nuget-vulnerability-on-ue-5-6-1-on-fresh-installation/2729092>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [June 16, 2026, 6:00pm UTC](https://forums.unrealengine.com/t/cant-compile-fresh-c-project-nuget-vulnerability-on-ue-5-6-1-on-fresh-installation/2729092 "2026-06-16T18:00:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Zombie.SoC1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zombie.SoC1](https://forums.unrealengine.com/u/Zombie.SoC1)\
**Post date:** [June 29, 2026, 8:20am UTC](https://forums.unrealengine.com/t/cant-compile-fresh-c-project-nuget-vulnerability-on-ue-5-6-1-on-fresh-installation/2729092/5 "2026-06-29T08:20:35Z")

</div>

Hi again 🙃

For those who might run into the similar trouble - i am one step further and i will check if it causes further troubles - if not will soon close this ticket.

The problem maybe even at its beginning seems to be linked to the **“Unreal IntegrationTool”** which seems to be outdated and not needed. This would explain, why the problem i experienced was somehow linked to the project environment at some point and looked in some lines of the output log like a fallback for some missing other part.

The last mentioned error ( “SetENV” task VS )that after reinstallation and updating this [magick.Net](http://magick.Net) and microsoft.build NuGet packages appeared can be repaired by following: solution and seems to be bound to VS 2026 and the local app data of Unreal Engine.

- 

> [@The "SetEnv" task failed unexpectedly](https://forums.unrealengine.com/t/the-setenv-task-failed-unexpectedly/2675115):
>
> I had just upgraded to UE 5.7 and Visual Studio 2026. I created a fresh new C++ project using the third person template. When I go to build the project in Visual Studio I keep getting this error: 1\>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.Cpp.Current.targets(102,5): error MSB4018: The “SetEnv” task failed unexpectedly. 1\>C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.Cpp.Current.targets(102,5): error MS…

After this a **new** error appeared - which was linked to the IntegrationTool:

> Expecting to find a type to be declared in a module rules named ‘VisualStudioTools’ in ‘UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’. This type must derive from the ‘ModuleRules’ type defined by UnrealBuildTool.

this can be fixed by deinstalling the IntegrationTool plugin + regenerating project files etc…

[Expecting to find a type to be declared in a module rules named ‘VisualStudioTools’ in ‘UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’. This type must derive from the ‘ModuleRules’ type defined by UnrealBuildTool.](https://Expecting%20to%20find%20a%20type%20to%20be%20declared%20in%20a%20module%20rules%20named%20'VisualStudioTools'%20in%20'UE5Rules,%20Version=0.0.0.0,%20Culture=neutral,%20PublicKeyToken=null'.%20%20This%20type%20must%20derive%20from%20the%20'ModuleRules'%20type%20defined%20by%20UnrealBuildTool.)

**In conclusion:**

The NuGet versions which worked so far for me are :

- Magick.NET-Q16-HDRI-AnyCPU 14.14.0 only installed on the demanded check point
- Microsoft.build 17.11.48

… they might have again a short expiration time (LOL)

Maybe worth mentioning:

- the reposted suggestion of fixing “SetENV” VS error using 2026 and setting the pathlength to a particular number did not fix the problem (and this only can be done in VS 2026)
- It was a BAD BAD BAD IDEA of repairing the VS-2022 installation: VS installer failed with an error that some UnrealEngine.msi could not be repaired and broke VS installation
- deinstalling VS 2022 DELETED: Epic launcher exe, any Unreal Engine Version installed on my system like here: [https://developercommunity.visualstudio.com/t/PackageId:UnrealEngineV1;PackageAction:R/10910043](https://developercommunity.visualstudio.com/t/PackageId:UnrealEngineV1;PackageAction:R/10910043)

---

_[View the full topic](https://forums.unrealengine.com/t/cant-compile-fresh-c-project-nuget-vulnerability-on-ue-5-6-1-on-fresh-installation/2729092)._
