Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Source Fails to Build

Hi. I am attempting to perform the final step to build Unreal 4 using the source code. When I try to Build the UE4 target in UE4.sln in Visual Studio 2013 Express, the process errors out after a couple of minutes with the following complaint: "Could not write output file 'Unreal 4 Source\Engine\Intermediate\Build\BuildRules\UE4Rules.dll' -- The process cannot access the file because it is being used by another process."

I have restarted my machine, and also deleted the file this line mentions (in hopes of getting a different and less weird error). Building the UE4 target re-built the object and generated the same error as before. I have also tried running the installer as an admin - to no avail, sadly.

Note: my operating system is Windows 7 Pro 64-bit SP1.

Has anyone else encountered this issue? Please help.

Product Version: UE 4.10
more ▼

asked Jan 27 '16 at 11:17 PM in Installation & Setup

avatar image

1 1 2 3

avatar image MasterVega Jan 27 '16 at 11:19 PM

Forgot to establish: the machine I am working on is not and will not be connected to the internet.

avatar image teak421 Jan 28 '16 at 01:07 AM

Hi. Have you tried deleting the entire intermediate directory?

avatar image MasterVega Jan 28 '16 at 04:28 PM

Heya. I just tried this. the UE4 file under Engine fails to load in Visual Studio if I remove the Intermediate directory.

avatar image Doug E ♦♦ STAFF Jan 28 '16 at 03:30 PM

Hey MasterVega-

Which version of the engine are you trying to install? If you are using 4.10.x or one of the 4.11 previews can you try building with Visual Studio 2015 instead? Do you get the same error if you use VS Community rather than Express? Also let me know if teak421's suggestion of deleting the intermediate folder and then trying to compile helps.


Doug Wilson

avatar image MasterVega Jan 28 '16 at 04:56 PM

Unfortunately, I can't say which I downloaded because I simply cloned the repository from Git (opened Git, selected "clone", then selected Unreal Engine.) I want to say 4.10.x. This is actually the second time I cloned the repository, the first also being unsuccessful due to technical issues (which have since been resolved)with the downloading computer. It may be working off of an old selection if that is a thing. Is it possible for me to tell a version from the files I have on my computer?

In the meantime. I'm going to try to acquire Visual Studio 2015 Community and see if that fixes my problem. I'll get back to you on whether or not it works.

Also: I did try teak421's suggestion, but it caused the UE4 file under the Engine folder to fail to load in VS.

Thanks for responding!

avatar image MasterVega Feb 01 '16 at 06:01 PM

I got VS 2015 Community and tried to build again. I am receiving the same errors as before:

Error 1: MSB3073 The command "....\Build.bat UE4Editor Win64 Development -waitmutex" exited with code -1.

Error 2: CS0016 Could not write to output file 'Unreal 4 Source\Engine\Intermediate\Build\BuildRules\UE4Rules.dll' -- 'The process cannot access the file because it is being used by another process.'

(comments are locked)
10|2000 characters needed characters left

4 answers: sort voted first

Hey everyone,

Just wanted to say we have just run into this problem, and the cause was, to put it short, that source file timestamps were in the future, catching UBT in a perpetual "target not up to date" loop.

Steps to reproduce:

  1. Have the system clock incorrectly point to the future (for whatever reason, e.g. failing BIOS battery).

  2. Download UE4 source.

  3. Set system clock to the correct time.

  4. Observe the problem.

The fix is to either reset the timestamps on the files in the working copy to the present (for instance using the touch Bash command), or to re-download everything, this time with the system clock set correctly.



more ▼

answered Oct 03 '16 at 12:05 PM

avatar image

Leszek Godlewski
16 1 5

avatar image TTimo Dec 05 '17 at 11:51 PM

This is the right answer. Happened to me as well.

(comments are locked)
10|2000 characters needed characters left

Hey MasterVega-

It seems like something else running is preventing the compiler from completing. Can you let me know if restarting your computer and then attempt to build before loading any other programs? Also, The CS0016 error that you posted seems to be an issue with the environment variables. Can you check that the environment variables are set poperly? This can be done by finding "MyComputer" or "Computer" in the start menu, rick clicking and selecting Properties. In the window that appears, select "Advanced system settings" on the left hand side. In the System Properties window under the Advanced Tab, click the button for Environment Variables... In the System variables box select the variable for "Path" and choose edit.


Doug Wilson

more ▼

answered Feb 02 '16 at 03:45 PM

avatar image MasterVega Feb 02 '16 at 05:49 PM


Would it be possible for you to explain what the correct setting should be? I copy/pasted the field into notepad and wasn't able to find any sort of reference to Unreal.

Also, I just attempted to compile immediately after boot. No luck... BUT! I tried something bazaar on a whim to see if it would work, and it did, strangely, as far as I can tell. I found "UE4Rules.dll" in windows explorer and deleted it. Then, I tried to compile the code. After the compiler created "UE4Rules.dll", I immediately renamed it. I did so again after the compiler created the file a second time. This actually allowed the build to succeed. I even started a new project. I also found out that the version I am compiling is actually 4.11, not 4.10.

Here is a detailed description of what we are seeing on our end:

  1. Project: ShaderCompileWorker creates UE4Rules.dll.

  2. Project: UE4

2.1. Creates UE4Rules.dll when output says "Creating makefile for UE4Editor".

2.1.1. Note: if we rename UE4Rules.dll before this completes, we build successfully as I talked about before.

2.2. When the output says "Creating makefile for UnrealHeaderTool", we get the errors we mentioned before (CS0016) (once again, unless we rename UE4Rules.dll before we get to this line).

I hope this is helpful. I had to be extremely quick to rename the files in time for this to work.

avatar image Doug E ♦♦ STAFF Feb 02 '16 at 06:04 PM

Are you using the Release branch from GitHub to acquire the source code? If so then it explains why you are getting 4.11 and you will need to get the 4.10 branch specifically to get the source code for 4.10.3.

Just to confirm, once you've downloaded and extracted the zip file you ran Setup.bat and GenerateProjectFiles.bat and the error is occurring when building UE4.sln inside Visual Studio, is this all correct? When building in VS for the first time, be sure that the Solution Configuration and Solution Platform are set to Development Editor and Win64 respectively.

avatar image MasterVega Feb 02 '16 at 06:51 PM

Well, acquiring 4.10.3 will take a while with my current setup. I might as well work in 4.11 until I can the older version.

I ran Setup.bat on a separate computer, which has an internet connection (since Setup.bat downloads ~4GB of data), and moved everything over to the non-connected machine. The error is indeed occurring when building UE4.sln in Visual Studio. The Solution Configuration and Solution Platform are/were respectively Development Editor and Win64 at the time of first compile attempt and all subsequent attempts.

avatar image Doug E ♦♦ STAFF Feb 08 '16 at 07:45 PM

Hey MasterVega-

I have tried to reproduce the build failure you mentioned but have not had any luck doing so yet. I wanted to confirm the steps I've tried to see if they match what you used to initiate the build process.

  1. First I downloaded the .zip file from GitHub, extracted it and ran Setup.bat.

  2. I then zipped the folder back up and copied it to another computer

  3. Unzipping the folder on computer2, I then ran GenerateProjectFiles.bat

  4. After opening the UE4.sln file I attempted to build the UE4 solution

If these steps don't match what you've been doing, please let me know what exactly you've tried so that I can follow along.

avatar image MasterVega Feb 09 '16 at 02:51 AM

That matches my process. I'm thinking it might have just been a botched download or write, especially because I discovered that I can't create C++ projects even when I use the weird trick I mentioned above.

Also: I have since convinced the necessary people to allow me to connect the system to the internet for a brief time to install Unreal Engine 4 via the download/installer, but it isn't really the optimal solution for our development environment and we would prefer to go with the source-building approach of possible. I will attempt a new download sometime soon to see if that solves my problem, and then I will get back to you on whether or not it worked.

Thanks for your help.

avatar image Doug E ♦♦ STAFF Feb 12 '16 at 07:08 PM

Hey MasterVega-

I just wanted to touch base and see if you've had the chance to try downloading and building the source again? Let me know if you have any further questions.

avatar image MasterVega Feb 22 '16 at 05:56 PM

I apologize for not getting back to you until now. I have been working on an Unreal Engine 4 project since having installed the engine with the downloader. No need to worry about me for a while. I will definitely post my results here when I do get around to trying to build from source again (probably in a few weeks), for the benefit of anyone else who may be having this problem.

(comments are locked)
10|2000 characters needed characters left

Hi MasterVega,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

more ▼

answered Feb 22 '16 at 05:39 PM

(comments are locked)
10|2000 characters needed characters left

Could it be in Registry you have more than 1 items under \HKCU\Software\Epic Games\Unreal Engine\Builds?

more ▼

answered Apr 07 '16 at 10:30 AM

avatar image

176 14 21 32

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question