Cannot generate project file after VS2017 update

After upgrading to VS2017 15.5.2 compile errors, cannot generate project file anymore.

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(
1601,5): error MSB4036: The “GetReferenceNearestTargetFrameworkTask” task was not found. Check the following: 1.) The n
ame of the task in the project file is the same as the name of the task class. 2.) The task class is “public” and imple
ments 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\Community\MSBuild\15
.0\bin” directory. [D:\GitHub\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]

I’ve checked the SDK version and it is now targeted for 10.0.16299.0
Is it working with this version or do I have to use the 10.0.15063.0 ?

Txs for your help.

Hi,

You should also install SDK 8.1 installed with VS 2017. Have you also tried deleting .vs, binary and intermediate folders and regenerating VS files? Sometimes such unknown compiler hiccups get fixed by just regenerating vs files and rebuilding the solution.

Hi,

The SDK is installed correctly. The problem came when I updated the VS2017 to the 15.5.2

I’ve deleted the unreal engine code source and clone it again from github.
But cannot GenerateProjectFiles -2017

I’ve uninstalled completely VS 2017 and all SDKs.
Re-installed using the options given by Epic Games and no way to GenerateProjectFiles same error.

D:\GitHub\UnrealEngine>GenerateProjectFiles.bat -2017
Setting up Unreal Engine 4 project files...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(
1601,5): error MSB4036: The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 1.) The n
ame of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and imple
ments the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project
 file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15
.0\bin" directory. [D:\GitHub\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(
1601,5): error MSB4036: The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 1.) The n
ame of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and imple
ments the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project
 file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15
.0\bin" directory. [D:\GitHub\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]

GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.

I don’t have VS 2015 installed.

Ok I found the solution.

You have to tick “NuGet package manager” within the VS 2017 installer.

EPIC GAMES: PLEASE UPDATE THE DOCUMENTATION

Hi, can you explain this a bit more?

I have no idea why the NuGet package manager is needed.
It should install one component needed to compile UE4 engine source code.
After having installed the NuGet package manager, I can compile the UE4 source code from Git and also my project.

Thank you very much, that worked for me!

what do you mean by “tick” NuGet package manager?

PS: if you installed VS 2015 , uninstall it firstly.You just only keep one version of VS.

Lifesaver thx!)

Individual components, the “Tools for working with code” tab (Visual Studio Community 2017).

Thank you so very much!!!

This walked like a charm! Thanks a bunch!

OMG thank you sooooooooooooooo much :smiley:

Worked for me (UE4 VXGI 2.0) The true hero, thanks!

WOW,Thanks a 10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 times

That’s done it. On to the next step. C’mon EPIC and Nvidia that would have sunk my battleship :slight_smile:

Thanks,
domzorg

FYI, for 4.20+ SDK 8.1 is no longer needed.

How did you figure that out? What a great catch!