# Need help solving error when running GenerateProjectFiles.bat

**URL:** <https://forums.unrealengine.com/t/need-help-solving-error-when-running-generateprojectfiles-bat/407595>\
**Category:** Multiplayer & Networking\
**Tags:** generateprojectfiles, source-code, engine-compile, setup, unreal-engine, UE4, question\
**Created:** [October 21, 2017, 7:48pm UTC](https://forums.unrealengine.com/t/need-help-solving-error-when-running-generateprojectfiles-bat/407595 "2017-10-21T19:48:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oezaxs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oezaxs](https://forums.unrealengine.com/u/Oezaxs)\
**Post date:** [October 21, 2017, 7:48pm UTC](https://forums.unrealengine.com/t/need-help-solving-error-when-running-generateprojectfiles-bat/407595/1 "2017-10-21T19:48:32Z")

</div>

Hi all!

I’m currently trying to build UE4 from source for a multiplayer project that I’m helping with. The only issue is that I can’t get past GenerateProjectFiles. Every time I run the .bat file I get the same error:

```
Setting up Unreal Engine 4 project files...
CSC : error CS0009: Metadata file 'C:\Program Files (x86)\Reference Assemblies\
Microsoft\Framework\.NETFramework\v4.5\System.Windows.Forms.dll' could not be o
pened -- An attempt was made to move the file pointer before the beginning of t
he file. [C:\Users\Brian's\Desktop\UE4\UnrealEngine-release\Engine\Source\Progr
ams\UnrealBuildTool\UnrealBuildTool.csproj]

GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.

Press any key to continue . . .

```

I’ve looked everywhere online but I can’t seem to find a solution. If anyone could help me figure out how to fix this it would be greatly appreciated.

Additional Details:  
So far I’ve tried a couple of solutions to fix the error but none of the following have worked so far.

- Uninstall and reinstalling .Net 4.5
- Turning off antivirus when running the .bat files
- Deleting the folder and re-downloading the source
- Downloading and extracting source from .zip and using that folder
- Running all bat files as administrator
- Made sure the specified file does exist (It does and it’s the same path specified in the error)
- Re-installed VS 2017 making sure all additional packages involving c++ are installed

None of the above has worked for me so if anyone knows another fix that works it would be a lifesaver. Thank you for any and all answers!
