x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

GenerateProjectFiles.bat with VS 2019

Hello! i'm having a problem building UE from sources. i have VS2019 with c# and c++ installed. (also i couldn't find tag for VS 2019)

so I did simple things:

and from the last CMD command i got a list of errors:

 Platform\Mac\UEBuildMac.cs(71,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Mac\UEBuildMac.cs(95,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 System\BuildVersion.cs(264,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 System\BuildVersion.cs(318,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Configuration\TargetRules.cs(1516,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Configuration\TargetRules.cs(2317,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Android\UEBuildAndroid.cs(56,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Android\UEBuildAndroid.cs(70,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\IOS\UEBuildIOS.cs(87,25): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\IOS\UEBuildIOS.cs(125,25): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\HTML5\UEBuildHTML5.cs(56,25): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\HTML5\UEBuildHTML5.cs(65,25): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Linux\UEBuildLinux.cs(94,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Linux\UEBuildLinux.cs(118,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Lumin\UEBuildLumin.cs(50,25): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Lumin\UEBuildLumin.cs(59,25): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Windows\UEBuildWindows.cs(301,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Windows\UEBuildWindows.cs(440,27): warning CS1692: Invalid number [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Mac\UEBuildMac.cs(79,15): warning CS1591: Missing XML comment for publicly visible type or member 'UnrealBuildTool.ReadOnlyMacTargetRules.bEnableAddressSanitizer' [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Mac\UEBuildMac.cs(84,15): warning CS1591: Missing XML comment for publicly visible type or member 'UnrealBuildTool.ReadOnlyMacTargetRules.bEnableThreadSanitizer' [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Platform\Mac\UEBuildMac.cs(89,15): warning CS1591: Missing XML comment for publicly visible type or member 'UnrealBuildTool.ReadOnlyMacTargetRules.bEnableUndefinedBehaviorSanitizer' [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Modes\BuildMode.cs(157,17): error CS0136: A local variable named 'RemoteMac' cannot be declared in this scope because it would give a different meaning to 'RemoteMac', which is already used in a 'parent or current' scope to denote something else [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Modes\CleanMode.cs(88,29): error CS0136: A local variable named 'TargetDescriptor' cannot be declared in this scope because it would give a different meaning to 'TargetDescriptor', which is already used in a 'parent or current' scope to denote something else [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Modes\CleanMode.cs(216,22): error CS0136: A local variable named 'TargetDescriptor' cannot be declared in this scope because it would give a different meaning to 'TargetDescriptor', which is already used in a 'parent or current' scope to denote something else [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Modes\CleanMode.cs(219,16): error CS0136: A local variable named 'RemoteMac' cannot be declared in this scope because it would give a different meaning to 'RemoteMac', which is already used in a 'parent or current' scope to denote something else [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Modes\JsonExportMode.cs(26,29): error CS0136: A local variable named 'TargetDescriptor' cannot be declared in this scope because it would give a different meaning to 'TargetDescriptor', which is already used in a 'parent or current' scope to denote something else [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Modes\GenerateProjectFilesMode.cs(24,44): error CS0103: The name 'nameof' does not exist in the current context [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Modes\GenerateProjectFilesMode.cs(25,44): error CS0103: The name 'nameof' does not exist in the current context [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Modes\GenerateProjectFilesMode.cs(26,33): error CS0103: The name 'nameof' does not exist in the current context [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
 Modes\GenerateProjectFilesMode.cs(27,33): error CS0103: The name 'nameof' does not exist in the current context [\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]

 System\ActionGraph.cs(201,17): error CS0135: 'Action' conflicts with the declaration 'UnrealBuildTool.Action'

 GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.
Product Version: UE 4.22
Tags:
more ▼

asked Apr 03 '19 at 09:03 PM in Installation & Setup

avatar image

WhiteFoxMadness
35 3 6 10

avatar image TriNityGER Apr 04 '19 at 12:13 AM

Same issue here! I also installed the C++ and C# toolchain for VS2019 Enterprise. I checked out the release branch.

avatar image Paul "TBBle" Hampson Apr 04 '19 at 03:32 AM

Based on the invalid number warning, and the nameof error, it appears that the C# code is being compiled with C# 5 or older, and requires C# 6. The code hasn't changed, so something else has shifted and we're now getting the wrong C# compiler or compiler flags when building the UE 4.22.0 source.

avatar image Paul "TBBle" Hampson Apr 04 '19 at 11:47 PM

Does mentioning UE-72173 in a comment on the question cause it to link to the Issue page?

avatar image Paul "TBBle" Hampson Apr 04 '19 at 11:47 PM

I guess not, it'd have to be added to the question itself.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

This is a bug in latest release of UE 4.22 . I also had the same issue.

They have already fixed it, but will be release as hot fix. Here is the commit for the fix. Commit Link for Fix.

Just cherry pick it will work. Or else copy the contents form remote to that file in your local.

So it generates successfully. But I m getting compilation error in VS2019, so it fails. But atleast I was able to generate project files.

more ▼

answered Apr 04 '19 at 04:57 AM

avatar image

ANURAGX
86 1 4 6

avatar image WhiteFoxMadness Apr 04 '19 at 02:07 PM

so i did

  • git cherry-pick fc7c25f48e1e1143f7c4a1d410e05eca5191ff24

  • GenerateProjectFiles.bat -2019

and now it tries to find VS2017: GenerateProjectFiles ERROR: We couldn't find a valid installation of Visual Studio. This program requires Visual Studio 2017.

avatar image WhiteFoxMadness Apr 04 '19 at 07:37 PM

okay it looks like i found the problem, i had it installed as prerelease so i had to add -prerelease flag to the same file on line 13 and then it generated project files

avatar image ANURAGX Apr 04 '19 at 05:37 PM

I had the same issue, I cherry picked the commit and it generated project files.

I only have vs 2019 installation.

avatar image ANURAGX Apr 04 '19 at 05:41 PM

In my vs 2019 installation, I made sure that I install all different version of .NET starting from 3.0 to latest available in VS 2019 installer.

avatar image ANURAGX Apr 04 '19 at 05:51 PM

See this guys.

https://issues.unrealengine.com/issue/UE-72173

The issue reported has the same log.

avatar image TehnoMag Apr 04 '19 at 07:05 PM

OK, i fixed it by installed 4.5 .NET target pack.

avatar image WhiteFoxMadness Apr 04 '19 at 07:26 PM

but i already have it

.NET packs

untitled.png (15.2 kB)
avatar image TriNityGER Apr 04 '19 at 08:07 PM

I fixed it by simply checking out the 4.22 branch instead of the release one so I don't have to cherry pick it. Now it works fine!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

It's probably related to Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj lines 2 and 15, which changed the ToolVersion and TargetFrameworkVersion.

Particularly interesting is that the same change was made before 4.21, and then reverted before release with the note

due to builders not having .NET 4.6.2

Anyway, check your Visual Studio Installer, and ensure you have the .NET Framework 4.6.2 SDK and targeting pack installed, and try the build again. Support for 4.6.2 is Optional in VS2019, not Recommended, so it won't be installed if you just installed the .NET desktop development workload. It's also optional in VS0217, so I expect more people will be hitting this issue.

more ▼

answered Apr 04 '19 at 04:00 AM

avatar image

Paul "TBBle" Hampson
24 1 4

avatar image Paul "TBBle" Hampson Apr 04 '19 at 05:39 AM

This turned out to not be the issue, when I tested the fix. It turns out, my docker system is using VS2019 underneath me.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question