Install/Compile Engine from source with VS 2017

Hi,

I downloaded the release version of the Engine (4.15) and wanted to compile it from source. Before this I was using the pre-compiled 4.13 version so it’s my first attempt at compiling the engine.

I have Visual Studio 2017 on Windows 10 and I have incurred in the following error when trying to run “GenerateProjectFiles.bat” after running Setup.bat:

C:\Users\Francesco\Documents\UnrealEngine-release>GenerateProjectFiles.bat -2017 -CurrentPlatform -NoShippingConfigs

Setting up Unreal Engine 4 project files...

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1098,5): error MSB3644: The reference a ssemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Ta rgeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [C:\ Users\Francesco\Documents\UnrealEngine-release\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]

GenerateProjectFiles ERROR: UnrealBuildTool failed to compile

(pasted from command line window)

I have installed the older Visual C++ Build Tools 2015 from http://landinghub.visualstudio.com/v…pp-build-tools and have both the VC++ 2017 v141 toolset (x86,x64) and the Visual Studio C++ core features,

I have also installed the Windows SDK 8.1, and have .NET Framework 4.5 and .NET Framework 4.6.2 SDK installed on my system (https://www.microsoft.com/net/download/framework)

I tried to open the UnrealBuildTool.csproj and to select a different version of the .NETframework target when prompted, but even so I get the same error as above when trying to launch GenerateProjectFiles.bat (regardless of whether I add “-2017 -CurrentPlatform -NoShippingConfigs” or not.)

Help!

you need to check the “Unreal Engine Installer” box in the VS2017 installer. it’ll check every required dependencies for VS2017 to work with UE4

Hi agapesoft,

Sorry for the delayed response. If you are still having trouble with this, try running the Visual Studio Installer and select the option to Modify your Visual Studio 2017 installation. In there, make sure the option for .NET desktop development is selected:

If it is not selected, you may need to uninstall your existing .NET framework installation first. In my case, this was not selected since I had the frameworks installed already for previous versions of Visual Studio. However, after installing and then removing the framework through the Visual Studio Installer, I was able to reproduce the error you described. Installing the framework again allowed me to successfully generate project files for Visual Studio 2017.

If it is already selected, deselect it and click Modify to remove the framework and then select it and click Modify again to reinstall it.

Thanks for your answers guys: I updated the VS installer and re-run it. I made sure I had the .NET framework, the windows 8 SKD, all the c++ add-ons and the Unreal support. It now runs at least the projectGenerator. I will now try and compile the engine and let you know.

Please let me know as well, i`m having the exacte same issues. XD would love to know how to fix it.

Hi Bioblaze,

If you run the Visual Studio installer and select the option to Modify your installation, what options do you have selected in the Workloads tab? In my case, I have the .NET desktop development, Desktop development with C++, and Game development with C++ options selected. For me, this seems to be all I need in order to use Visual Studio 2017 with 4.15.

i’ve installed vs2015, vs2017, every single .net Anything you can imagen, and yea Still cant get it to compile. Its also effecting me packaging plugins, and games as well. About too a point where i’ll completely uninstall/reinstall windows 10. @.@

Could you please provide some screenshots from the Visual Studio installer so I can see exactly what components you have installed for VS 2017? Specifically, what options are checked in the Summary section for the .NET desktop development, Desktop development with C++, and Game development with C++ workloads?

I’m doing a complete Reinstall of Windows 10 pro edition within the Next Few days, For some reason, it I dont have 4.5 installed for anything. Well I do but it says I dont. I installed every single Option that is Available to install on both vs2015 and vs2017 I also had it working properly a few months ago. I believe it was the Windows Content CReators Update that broke this. So yea i’m doing a complete reinstall. I will tell you what happens after. :slight_smile:

It worked…

In my case, I have to select “.NET Framework 4.6.1 Develop Tool” manually even I have installed “.NET Desktop Development” suit.

thanks it worked for me after mannully selecting “.NET Framework 4.6.1 Develop Tool”

I had luck getting it to work after installing The Microsoft .NET Framework 4.6.2 Developer Pack right from Microsoft -

https://www.microsoft.com/en-us/download/details.aspx?id=53321

I had luck getting it to work after installing The Microsoft .NET Framework 4.6.2 Developer Pack right from Microsoft -

https://www.microsoft.com/en-us/download/details.aspx?id=53321