Error: VisualStudioToolsCommandlet looked like a commandlet, but we could not find the class.

I also get this error with UE 5.1.

I solved it by going to Visual Studio Installer → Visual Study Community 2022 → Modify - Individual Components → uncheck IDE Support for Unreal Engine.

I’m not sure if it is the correct solution, but worked for me.

4 Likes