I’ve been having trouble getting the UWP fork to generate project files and compile the engine for the last few months, but in the last few days I have finally got it up and running. Here’s solution which has worked from me on both my work and home machines.
I’d have no issue until running the GenerateProjectFiles.bat then I would get the following issues:
1)Could not locate the assembly “Windows”
2)The type or namespace name ‘Windows’ could not be found
3)Cannot locate the windows SDK folder.
Here how I have finally got it compiling:
- Download the latest version of Visual Studio Community, you will need to install the following workloads from the installer:
Universal Windows Platform Development,
Desktop Development with C++,
Game Development with C++
and Mobile Development with C++ (The Mobile Development with C++ might not be necessary but I’m covering all of the bases).
You will also require the following individual components:
Visual C++ runtime for UWP,
.NET Framework 4.5.2 targeting package,
.NET Framework 4.7.1 SDK,
.NET Framework targeting package,
Windows 8.1 SDK
and .NET Core runtime.
- Run the Setup.bat file from the UWP_UNREAL folder, this should install any further missing files such as the XBOX Live extension SDK (annoyingly it won’t install any missing .NET framework packages).
2.1) Running the GenerateProjectFiles.bat files now was where I encountered issues.
[Edit]
3) Check the following directory: C:\Program Files (x86)\Windows Kits\10\UnionMetadata, there should be a file here called Windows.winmd. If there isn’t open the folder ‘10.0.16299.0’ (there should be folder here with some series of numbers, this will be the version of the windows 10 SDK that you currently have installed), there should be the Windows.winmd file here, copy it and paste it into the C:\Program Files (x86)\Windows Kits\10\UnionMetadata folder.
The C:\Program Files (x86)\Windows Kits\10\UnionMetadata directory is where the UnrealBuildTool.csproj file will look to find the Windows.winmd file if it can’t find it elsewhere. This should solve the 1) and 2) errors at the top of this reply.
[Edit]
-
In the UnrealBuildTool.csproj file the line: <TargetPlatformVersion>8.0</TargetPlatformVersion> needs replaced with: **<TargetPlatformVersion>8.1</TargetPlatformVersion> **(it should be line 239)
-
Run the GenerateProjectFiles.bat file from the CMD admin privileges (run as admin) with the command** -2017**
Your command line should look like this: **UWP_UNREAL_FOLDER]>GenerateProjectFiles.bat -2017 ** (Don’t forget the change the directory of the command line to the your UWP_UNREAL folder, if you don’t know how to do that check out this page: https://www.digitalcitizen.life/comm…basic-commands)
This should allowed me to generate the project files, and open the .sln project file in visual studio (run as ADMIN) and compile the engine.
- If the errors from the GenerateProjectFiles.bat file persist (particularly that the windows SDK folder cannot be found) then the SDK location in the registry maybe incorrect (as it was on my work computer, but not my home machine oddly enough).
I cannot stress strongly enough that if you are not familiar with the registry editor that you should not mess with it and that you should ignore this step.
Look for the registry folders here: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows, there should be a v10.0 and a v8.1 folder. In each for them check the InstallationFolder Key, their values should be C:\Program Files (x86)\Windows Kits\10 and C:\Program Files (x86)\Windows Kits\8.1 respectively.
After fixing any issues here run step five again.
I hope this helps.