Fail to GenerateProjectFiles

Hey guys

I’m building a source engine on Windows but it fails.

First im running the Setup.bat in adminmode.
Than I’m trying to run GenerateProjectFiles.bat again in adminmode and I’m getting this error (unfortunatly only in german):

Setting up Unreal Engine 4 project files…
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(
1657,5): error MSB4036: Die Aufgabe “GetReferenceNearestTargetFrameworkTask” wurde nicht gefunden. Überprüfen Sie Folge
ndes: 1.) Der Name der Aufgabe in der Projektdatei entspricht dem Namen in der Aufgabenklasse. 2.) Die Aufgabenklasse i
st “public” und implementiert die Microsoft.Build.Framework.ITask-Schnittstelle. 3.) Die Aufgabe ist in der Projektdate
i oder in den *.task-Dateien im Verzeichnis “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0
\bin” mit <UsingTask> richtig deklariert. [C:\Users\patri\Documents\Repositories\UnrealEngine\Engine\Source\Programs\Un
realBuildTool\UnrealBuildTool.csproj]

GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.

Drücken Sie eine beliebige Taste . . .

I fixed this by installing all of the .NET Framework SDK’s and Targets under the “Individual Components” tab of the Visual Studio Installer for VS2019.

thanks that worked out :slight_smile:

Start Visual Studio Installer again.

On the Build Tools 2017, click Modify,

Ensure that “Nuget targets and build tasks” are ticked.

Press Modify to complete.

Thanks! Ran into this issue as well. I updated this component for both VS 2017 and VS 2019.

image

I’m still troubleshooting the issue…

UATHelper: Packaging (Xbox One): ERROR: Failed to build “D:\UnrealEngine\UnrealEngine_4_21_XDK\Engine\Source\Programs\AutomationTool\Scripts\UAT.proj”:
UATHelper: Packaging (Xbox One): C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1657,5): error MSB4036: The “GetReferenceNearestTargetFrameworkTask” task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.
) The task class is “public” and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the “C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin” directory. [D:\UnrealEngine\UnrealEngine_4_21_XDK\Engine\Source\Programs\Au
tomationTool\AllDesktop\AllDesktop.Automation.csproj]

I have some updates available for Visual Studio and the Build Tools. So I’ll update those to see if that fixes this issue.

That was it. After I updated Visual Studio and the build tools the nuget components were unchecked. I then had to install the nuget and task components and now I’m passed the error.

Thanks!