visual studio 2017 stuck building ue4

While attempting to add a source-code plugin to my source-code build of UE4, I somehow messed it up and it won’t launch. So I’m doing a clean rebuild.

I deleted the Saved and Intermediate folders, marked all the files so they’re not Read-only (in both the engine folder and my project), tried what Google says to do to remove the Mark of the Web from Visual Studio files, etc.

But no matter what I’ve done, when I try to Rebuild All on the UE4 solution in VS 2017, it works for about 2 minutes, then I come back 24 hours later to find that it’s still on the same log at the same progress bar position as it was at 2 minutes from the start.

No error messages except for the numerous warnings about access denied and mark of the web and cannot build UnrealBuildTool, etc., but those were all from the first 2 minutes. The most recent log is from 24 hours before. So I Cancel the Build and try a few more random things the internet says to do, and I try Rebuild All again. Same thing happens, just gets stuck on a different file this time.

Sometimes it gets stuck compiling Slate, sometimes it gets stuck compiling something else. It’s always a little different. Maybe I just have to keep Building and Canceling until it gets through all 25,000+ files?

Is it because I’m trying to build 4.20.3 with VS 2017 when the project file has a tiny “15” in the corner of its icon in File Explorer?

Without error messages or any kind of feedback from the compiler, I have no clue what I’m doing wrong, or why it thinks it’s fine to just sit there doing nothing all day after it was working for 2 minutes, and then still tells me it’s busy building the project/solution when clearly it’s not.

I tried changing from Debug build to Development - Editor build config. Didn’t really make a difference.

I also tried disabling this weird thing I don’t remember ever installing, called Incredibuild. What’s that for? Should I be using it instead of the regular Build menu? I disabled it in case it was interfering with the regular Builder, maybe locking files or something. But it doesn’t seem to have made a difference.

I also tried setting Trusted local and remote web sites in Internet Explorer to include localhost, and removing something called “streams” from all subdirectories of Visual Studio and my Unreal Engine 4.20.3 source build (using the streams.exe file from Microsoft)

I have no idea what I’m doing, let alone what I’m doing wrong. I’m trying to remember how I got through this gauntlet of obstacles last time I built from source. I remember struggling just as much that time, and sadly can’t remember what magical random thing I did to make it work back then.

Any ideas what I can do about this? I need my source build working again. All I wanted to do was add one measly plugin, and now I can’t even open my project in the Editor.

Have you made changes to the engine source code in the version you are trying to build?

Not since the last time I had it successfully build. All I changed for the last successful build was to turn on Bloom effects for splitscreen (and that’s literally the only reason I am building the engine from source - there’s no other way to do it)

This last attempt finally got to several dozen error messages - which is better than being stuck forever. I’m not sure what allowed that through but I have since added my UE4 folder (from the GIT source) and Visual Studio 2017 folders to AVG anti virus’ Exceptions list. Hopefully that will get it to build.

I have changed nothing about the source code except for turning that hardcoded splitscreen bloom flag from 0 to 1.

Right now it’s been unable to create Unreal Build Tool (which I definitely did NOT change), so I hope that AVG was the reason.

Okay I might be making progress. Now it’s ended with a ton of errors:

link text

I ran Build Solution again, and got this:

link text

Sadly, I don’t know what any of that means, and it doesn’t seem to be getting any better. I thought maybe it has some circular dependencies or something that would work themselves out if I compiled it enough times, but doesn’t seem to be any better.

I Cleaned the solution and tried Build All on just the UnrealBuildTool C#.

I got this:

link text

That’s after changing the max parallel project builds from 8 to 1. doesn’t make much difference, in the end.

I would delete all of it, reclone the repository, run setup.bat and generate the visual studio files again. Get it running from a clean-rebuild before making changes.

Even though the only change was that I changed a 0 to a 1, and it worked fine before?

Will that resolve the error I keep getting where it says 5 instances of UnrealBuildTool are preventing UnrealBuildTool from being built?

It’s worth a try, but I’m afraid I will just come around to the same situation all over again.

Okay I got Github for Windows, cloned the release version of UE4 source code, ran Setup.bat, and then ran GenerateProjectFiles.bat, which gave this error:

Setting up Unreal Engine 4 project files…
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin
\Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference
assemblies for framework “.NETFramework,Version=v4.6.2” were not found. To reso
lve this, install the SDK or Targeting Pack for this framework version or retar
get your application to a version of the framework for which you have the SDK o
r Targeting Pack installed. Note that assemblies will be resolved from the Glob
al Assembly Cache (GAC) and will be used in place of reference assemblies. Ther
efore your assembly may not be correctly targeted for the framework you intend.
[C:\UnrealEngine-4.22.3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool
.csproj]

GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.

Press any key to continue . . .

It just really hates compiling UnrealBuildTool these days.

I think your problem is almost solved.
That error is easy to fix:

First go to your Windows Settings (I’m using Windows 10 so these instructions will be similar but not exactly the same for other versions of windows - I think it used to be called Control Panel)

Select “Apps”

Select “Visual Studio 2017 Community” (that’s the version I use)

Select “Modify”

It may want you to “update” which you should let it do.

When that is complete then you will be able to find and install .NETFramework,Version=v4.6.2

Did you do that through the Visual Studio Installer?

I saw it needs .NET Framework 4.6.2 - so I downloaded and installed that – well I tried to anyway. When I did so the installer said:

.NET Framework 4.6.2 or a later update is already installed on this computer.

so Windows thinks .NET framework 4.6.2 is already installed, but Unreal thinks it’s not. What do I do now?

I might have botched my VS install. It said same or later version already installed. Even after I removed 4.7+ so I removed ALL of the targeting thingies but that says it means I have to remove a lot of other things too including some stuff that says “Unreal” on it. Oh well

Okay so after that uninstalling of individual components and their dependents finished, I did what you said and it just started up Visual Studio Installer (which I already had open before).

4.6.2 is not listed, 4.6, 4.6.1, and 4.7+ are listed, but not 4.6.2 so I’m going to try that installer I downloaded again, now that ALL the other versions are removed.

…aaaand the installer STILL says
.NET Framework 4.6.2 or a later update is already installed on this computer.

After removing ALL the versions in both Visual Studio Build Tools 2017 (2)
15.9.15 and Visual Studio Community 2017 15.9.15

Where else can I look to uninstall this mysterious thing so the installer for 4.6.2 I downloaded will let me install it?

No, 4.6.2 doesn’t appear in the VS installer, so I had to download .NET Framework 4.6.2 from the Microsoft website which gives me NDP462-KB3151802-Web.exe

When I run that exe it says 4.6.2 is already installed. So I restarted my computer just in case that helps, and run the exe again, so I can get 4.6.2 in the VS Installer’s lists. But it still gives me the “already installed” error every time I run it.

I’m using Windows 8.1

I go to Control Panel and Add/Remove Programs, and find Visual Studio Community 2017 in the list (see screenshot). I right-click it and have Uninstall or Change as options. I click Change, and it launchers Visual Studio Installer.

Once in Visual Studio Installer I click Individual Components tab, and locate the .NET Framework ones. As you can see in the other screenshot, it is not present.

So that’s why I’m using this other thing downloaded from Microsoft’s website, but it gives me this screenshot when I try:

285744-cantinstall4-6-2.jpg