# "Generate Visual Studio project files" automatically closes output window after error

**URL:** <https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169>\
**Category:** Platform & Builds\
**Tags:** error-building, unreal-engine, generate-project-fil, question\
**Created:** [November 21, 2017, 1:50am UTC](https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169 "2017-11-21T01:50:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steazy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steazy](https://forums.unrealengine.com/u/Steazy)\
**Post date:** [November 21, 2017, 1:50am UTC](https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169/1 "2017-11-21T01:50:14Z")

</div>

Using 4.16 installed via the Epic Launcher, I am updating a project from 4.15 to 4.16.

Generating project files fails because of an error, and then the output window is immediately auto-closed leaving about 1 frame to try and read the error message.

Probably the most frustrating thing I’ve ever experienced on a computer.

I’m poking around to see if the output is written to a file somewhere, but seriously… if a warning or error occurs generating project files _please_ don’t close the output window. It would be really useful to be able to see what the error message was, plus it’d be nice if there was some difference in output between success and failure.

As it stands, in both cases the progress bar goes to 100% and then the window closes, if I didn’t compulsively click “Show Log” and delete the old project.sln I wouldn’t even know there was anything wrong (until I opened Visual Studio and it gave me an error out of the Dead Sea Scrolls).

---

<div class="post-metadata">

**Author:** ![Steazy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steazy](https://forums.unrealengine.com/u/Steazy)\
**Post date:** [November 21, 2017, 2:17am UTC](https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169/2 "2017-11-21T02:17:01Z")

</div>

EDIT: Disregard - better solution below that I can’t vote on :X

Crappy solution but it does work…

cmd/\> {UE4InstallRoot}\Engine\Build\BatchFiles\Build.bat {ProjectName}Editor Win64 Development “{ProjectFolderRoot}/{ProjectName}.uproject” PAUSE

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [January 4, 2018, 3:41pm UTC](https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169/3 "2018-01-04T15:41:36Z")

</div>

Bump. This issue drives me around the frigging twist.

PAUSE doesn’t work for me either

---

<div class="post-metadata">

**Author:** ![sonnyday](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sonnyday](https://forums.unrealengine.com/u/sonnyday)\
**Post date:** [January 15, 2018, 7:53pm UTC](https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169/4 "2018-01-15T19:53:37Z")

</div>

Found a very cheeky workaround. When you generate vs files, show the log, then when you see the scroll bar, click and hold it and it will remain open. The only problem is that you have to catch it when the error message displays since it will not update the message when the scroll bar is held. Good luck! 😃

---

<div class="post-metadata">

**Author:** ![Steazy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steazy](https://forums.unrealengine.com/u/Steazy)\
**Post date:** [January 24, 2018, 2:19am UTC](https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169/5 "2018-01-24T02:19:46Z")

</div>

From - [Generate project solution without Engine project - C++ Programming - Unreal Engine Forums](https://forums.unrealengine.com/development-discussion/c-gameplay-programming/80656-generate-project-solution-without-engine-project)

To save a click here’s a batch file I’ve been using (substitute your paths for anything in {})

```
"{EPIC_GAMES_PATH}\{UE_VERSION}\Engine\Binaries\DotNET\UnrealBuildTool.exe" -projectfiles -project="%~dp0{PROJECT_FILE_NAME}.uproject" -game
PAUSE

```

Unfortunately the engine source seems to always be included now, so while this didn’t solve the question I linked (and found it from) it does nicely solve this problem… except now I’d really love to have a .sln without the UE4 source as it does slow down intellisense and VAX quite a bit 😕

Also _psssst_, Epic… document your cmd line APIs kthx 😛

---

<div class="post-metadata">

**Author:** ![Steazy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steazy](https://forums.unrealengine.com/u/Steazy)\
**Post date:** [January 24, 2018, 2:21am UTC](https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169/6 "2018-01-24T02:21:24Z")

</div>

Found a more workable solution…

In a batch file -

```
"{EPIC_GAMES_PATH}\{UE_VERSION}\Engine\Binaries\DotNET\UnrealBuildTool.exe" -projectfiles -project="%~dp0{PROJECT_FILE_NAME}.uproject" -game
 PAUSE
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_97934485](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_97934485](https://forums.unrealengine.com/u/anonymous_user_97934485)\
**Post date:** [January 31, 2018, 7:14am UTC](https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169/7 "2018-01-31T07:14:59Z")

</div>

Check if you have more than one version of VS installed. I took the error in a slow motion video and found it mention an error with the VS 2015. I had both 2015 and 2017 installed. After uninstalling 2015 it compiled normally. Also make sure you have installed the NuGet package manager in 2017 or it will throw another error.

Edit: you can take slow motion video with many phones. there are apps for that too if it doesn’t come with your phone.

---

<div class="post-metadata">

**Author:** ![archimonde1111](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@archimonde1111](https://forums.unrealengine.com/u/archimonde1111)\
**Post date:** [January 8, 2024, 3:37am UTC](https://forums.unrealengine.com/t/generate-visual-studio-project-files-automatically-closes-output-window-after-error/410169/8 "2024-01-08T03:37:54Z")

</div>

It’s an old question but if someone stumbles on it.  
To find the logs from generator go into:  
YourProject/Saved/Logs/UnrealVersionSelector-[YourDate]  
Sorting files by Date modified should show you newest file.
