Home > Back-end >  How to Generate Visual Studio Project Files from Unreal Engine .uproject file with a batch file?
How to Generate Visual Studio Project Files from Unreal Engine .uproject file with a batch file?

Time:10-29

I have a batch file as follows to clean my UE project.

del *.sln
rmdir /s /q .vs
rmdir /s /q Binaries
rmdir /s /q Intermediate
rmdir /s /q Saved
rmdir /s /q DerivedDataCache
"C:\Program Files (x86)\Epic Games\Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe" /projectfiles Attaching.uproject

Unfortunately, when I run the batch, I get an error as follows:

enter image description here

I found the last command in the batch by reverse-engineering as shown below:

enter image description here

enter image description here

enter image description here

Question

What is the correct way to generate Visual Studio project files from a batch file?

CodePudding user response:

After wasting a lot of time, I found the solution. We have to fully qualify the project path.

echo off

del *.sln
rmdir /s /q .vs
rmdir /s /q Binaries
rmdir /s /q Intermediate
rem rmdir /s /q Saved
rmdir /s /q DerivedDataCache


set MyUVS="C:\Program Files (x86)\Epic Games\Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe"
set MyUBT="f:\Program Files\Epic Games\UE_4.26\Engine\Binaries\DotNET\UnrealBuildTool.exe"

rem change Transformation to your own project name
set MyFullPath="           
  • Related