System.IO error with VScode

I’m trying to make my first c++ project using VScode, i get this error, and now i can’t even open the proyect in the editor, any help is appreciated

> Executing task: Engine\Build\BatchFiles\Build.bat BatteryCollector Win64 Test "C:\Users\Marchin\Documents\Unreal Projects\BatteryCollector\BatteryCollector.uproject" -waitmutex <

Creating makefile for BatteryCollector (no existing makefile)
ERROR: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Epic Games\UE_4.18\Engine\Source\Projects\BatteryCollector\BatteryCollector.uproject'.
          at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
          at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
          at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
          at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
          at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
          at Tools.DotNETCommon.JsonObject.Read(FileReference File)
          at UnrealBuildTool.ProjectDescriptor.FromFile(FileReference FileName)
          at UnrealBuildTool.RulesCompiler.CreateProjectRulesAssembly(FileReference ProjectFileName)
          at UnrealBuildTool.UEBuildTarget.CreateTarget(TargetDescriptor Desc, String[] Arguments, Boolean bCompilingSingleFile)
          at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile)
The terminal process terminated with exit code: 1

Hi, I also had the same problem just earlier. What helped me solve it was the answer by the user MirrorNext in another thread. The problem was a space in the .uproject files path.

Renaming your “Unreal Projects” folder to “UnrealProjects” should do the trick.

Cheers