Generateprojectfiles.bat Error - Could not find definition for module

I have this error in VS 2017 that says “can’t find definition for module”. It gives the same error when running generateprojectfiles.bat stating "Warning: Exception while generating include data for UE4Editor: Could not find definition for module ‘OnlineSubsystem’ (referenced via defualt plugins → OnlineSubsystem.uplugin)

Here’s the VS output:

Severity Code Description Project File Line Suppression State
Error MSB3075 The command “…\Build\BatchFiles\Build.bat UE4Editor Win64 Development -WaitMutex -FromMsBuild” exited with code 5. Please verify that you have sufficient rights to run this command. UE4 D:\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44
Error Could not find definition for module ‘OnlineSubsystem’ (referenced via default plugins → OnlineSubsystem.uplugin) UE4 D:\Unreal Projects\UnrealEngine-VXGI2-4.19\Engine\Intermediate\ProjectFiles\UnrealBuildTool 1

Have you followed these instructions yet?

Setting Up Visual Studio for Unreal Engine | Unreal Engine Documentation

.UnrealVS Extension | Unreal Engine Documentation

No luck there, same problem

I just notice the “Please verify that you have sufficient rights to run this command”.

  1. try running as admin
  2. Check the folder location, and see if you have read/write permissions

Try these and let me know how it goes.

you can also check if your prjoect folder is set to read only within its property’s description