MSB6003 cmd.exe Access Denied Visual Studio

Error MSB6003 The specified task executable “cmd.exe” could not be run. System.ComponentModel.Win32Exception (0x80004005): Access Denied

When i try to compile any Unreal Engine Project on Visual Studio 2019 i get this error in the Visual Studio console.

This error persisted also with a fresh installation of Windows.

I couldn’t find anything on Google related to this problem. Any suggestions?

EDIT: Solved

It turned out to be Comodo Firewall that was silently blocking Visual Studio.