Error: Tools.DotNETCommon.Win32Exceptionwithcode (0x80004005)

I’ve been having problems packaging my projects on Unreal through Perforce. I’ve tried various solutions from instructors and classmates on how to solve this, but with no results.
The following are the different “solutions” given to me that didn’t help.

  1. Visual Studio installer, by having Desktop Development with C++, .NET Desktop Development, and Game Development with C++.
  2. Perforce setup. My instructor helped me set it up and still getting the error.
  3. Current Unreal Engine is 4.27.2.
    So what would cause this error?