GenerateProjectFiles.bat fails when trying to build initial UE4 source project files with Switch access

Setting up Unreal Engine 4 project files…
While compiling M:\Downloads\UnrealEngine-release\Engine\Intermediate\Build\BuildRules\UE4Rules.dll:
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(8,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(26,7) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(28,38) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(32,38) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(37,5) : error CS1502: The best overloaded method match for ‘UnrealBuildTool.ModuleRules.AddEngineThirdPartyPrivateStaticDependencies(UnrealBuildTool.ReadOnlyTargetRules, params string[])’ has some invalid arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(37,50) : error CS1503: Argument 1: cannot convert from ‘UnrealBuildTool.TargetInfo’ to ‘UnrealBuildTool.ReadOnlyTargetRules’
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(37,58) : error CS1503: Argument 2: cannot convert from ‘string’ to ‘string[]’
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(42,4) : error CS1502: The best overloaded method match for ‘UnrealBuildTool.ModuleRules.AddEngineThirdPartyPrivateStaticDependencies(UnrealBuildTool.ReadOnlyTargetRules, params string[])’ has some invalid arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(42,49) : error CS1503: Argument 1: cannot convert from ‘UnrealBuildTool.TargetInfo’ to ‘UnrealBuildTool.ReadOnlyTargetRules’
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\NVNRHI\NVNRHI.Build.cs(42,57) : error CS1503: Argument 2: cannot convert from ‘string’ to ‘string[]’
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchAudio\SwitchAudio.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchMediaDecoder\SwitchMediaDecoder.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchPlatformFeatures\SwitchPlatformFeatures.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchRuntimeSettings\SwitchRuntimeSettings.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(11,13) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(13,36) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(14,49) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(18,20) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(21,41) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(22,41) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(45,21) : error CS0122: ‘UnrealBuildTool.WindowsPlatform’ is inaccessible due to its protection level
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(42,5) : warning CS0618: ‘UnrealBuildTool.ModuleRules.PublicLibraryPaths’ is obsolete: ‘For external libraries use the full path in PublicAdditionalLibraries, if its a system library then use PublicSystemLibraries/PublicSystemLibraryPaths’
m:\Downloads\UnrealEngine-release\Engine\Source\Runtime\Switch\SwitchSDK\SwitchSDK.Build.cs(53,3) : warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is obsolete: ‘The ‘Definitions’ property has been deprecated. Please use ‘PublicDefinitions’ instead.’
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchAudioFormat\SwitchAudioFormat.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchAudioFormat\SwitchAudioFormat.Build.cs(18,7) : error CS0103: The name ‘UEBuildConfiguration’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchPlatformEditor\SwitchPlatformEditor.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchPlatformEditor\SwitchPlatformEditor.Build.cs(48,3) : warning CS0618: ‘UnrealBuildTool.ModuleRules.PlatformSpecificDynamicallyLoadedModuleNames’ is obsolete: ‘PlatformSpecificDynamicallyLoadedModuleNames is deprecated; use DynamicallyLoadedModuleNames instead’
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchShaderFormat\SwitchShaderFormat.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchShaderFormat\SwitchShaderFormat.Build.cs(13,3) : error CS1502: The best overloaded method match for ‘UnrealBuildTool.ModuleRules.AddEngineThirdPartyPrivateStaticDependencies(UnrealBuildTool.ReadOnlyTargetRules, params string[])’ has some invalid arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchShaderFormat\SwitchShaderFormat.Build.cs(13,48) : error CS1503: Argument 1: cannot convert from ‘UnrealBuildTool.TargetInfo’ to ‘UnrealBuildTool.ReadOnlyTargetRules’
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchShaderFormat\SwitchShaderFormat.Build.cs(13,56) : error CS1503: Argument 2: cannot convert from ‘string’ to ‘string[]’
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchShaderFormat\SwitchShaderFormat.Build.cs(26,3) : error CS1502: The best overloaded method match for ‘UnrealBuildTool.ModuleRules.AddEngineThirdPartyPrivateStaticDependencies(UnrealBuildTool.ReadOnlyTargetRules, params string[])’ has some invalid arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchShaderFormat\SwitchShaderFormat.Build.cs(26,48) : error CS1503: Argument 1: cannot convert from ‘UnrealBuildTool.TargetInfo’ to ‘UnrealBuildTool.ReadOnlyTargetRules’
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchTargetPlatform\SwitchTargetPlatform.Build.cs(10,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchTargetPlatform\SwitchTargetPlatform.Build.cs(26,7) : error CS0103: The name ‘UEBuildConfiguration’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Source\Developer\Switch\SwitchTextureFormat\SwitchTextureFormat.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Plugins\Media\Switch\SwitchMedia\Source\SwitchMedia\SwitchMedia.Build.cs(7,16) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Plugins\Media\Switch\SwitchMedia\Source\SwitchMediaEditor\SwitchMediaEditor.Build.cs(7,16) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Plugins\Media\Switch\SwitchMedia\Source\SwitchMediaFactory\SwitchMediaFactory.Build.cs(7,16) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(9,10) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(34,20) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(52,88) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(13,4) : warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is obsolete: ‘The ‘Definitions’ property has been deprecated. Please use ‘PublicDefinitions’ instead.’
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(48,5) : warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is obsolete: ‘The ‘Definitions’ property has been deprecated. Please use ‘PublicDefinitions’ instead.’
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(49,5) : warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is obsolete: ‘The ‘Definitions’ property has been deprecated. Please use ‘PublicDefinitions’ instead.’
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(79,6) : warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is obsolete: ‘The ‘Definitions’ property has been deprecated. Please use ‘PublicDefinitions’ instead.’
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(80,6) : warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is obsolete: ‘The ‘Definitions’ property has been deprecated. Please use ‘PublicDefinitions’ instead.’
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(88,6) : warning CS0618: ‘UnrealBuildTool.ModuleRules.PublicLibraryPaths’ is obsolete: ‘For external libraries use the full path in PublicAdditionalLibraries, if its a system library then use PublicSystemLibraries/PublicSystemLibraryPaths’
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(134,5) : warning CS0618: ‘UnrealBuildTool.ModuleRules.PublicLibraryPaths’ is obsolete: ‘For external libraries use the full path in PublicAdditionalLibraries, if its a system library then use PublicSystemLibraries/PublicSystemLibraryPaths’
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXOnlineSubsystem\NEXOnlineSubsystem.Build.cs(138,5) : warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is obsolete: ‘The ‘Definitions’ property has been deprecated. Please use ‘PublicDefinitions’ instead.’
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXRuntimeSettings\NEXRuntimeSettings.Build.cs(7,9) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXRuntimeSettings\NEXRuntimeSettings.Build.cs(20,20) : error CS1061: ‘UnrealBuildTool.TargetInfo’ does not contain a definition for ‘Type’ and no extension method ‘Type’ accepting a first argument of type ‘UnrealBuildTool.TargetInfo’ could be found (are you missing a using directive or an assembly reference?)
m:\Downloads\UnrealEngine-release\Engine\Plugins\Online\Switch\NEXOnlineSubsystem\Source\NEXRuntimeSettings\NEXRuntimeSettings.Build.cs(20,68) : error CS1061: ‘UnrealBuildTool.TargetInfo’ does not contain a definition for ‘Type’ and no extension method ‘Type’ accepting a first argument of type ‘UnrealBuildTool.TargetInfo’ could be found (are you missing a using directive or an assembly reference?)
m:\Downloads\UnrealEngine-release\Engine\Plugins\Switch\NpadController\Source\NpadController\NpadController.Build.cs(7,12) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Plugins\Switch\SwitchMoviePlayer\Source\SwitchMoviePlayer\SwitchMoviePlayer.Build.cs(9,16) : error CS1729: ‘UnrealBuildTool.ModuleRules’ does not contain a constructor that takes 0 arguments
m:\Downloads\UnrealEngine-release\Engine\Plugins\Switch\SwitchMoviePlayer\Source\SwitchMoviePlayer\SwitchMoviePlayer.Build.cs(22,50) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
m:\Downloads\UnrealEngine-release\Engine\Plugins\Switch\SwitchMoviePlayer\Source\SwitchMoviePlayer\SwitchMoviePlayer.Build.cs(46,26) : error CS0103: The name ‘SwitchPlatformSDK’ does not exist in the current context
ERROR: Unable to compile source files.

GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files.

Press any key to continue . . .

Did you find out the way solve this?

I did.

I had to download 4.27 though, 4.26.1 was broken.

  1. Download 4.27, unzip to the root of a drive (otherwise your path names become too long and stuff will fail)
  2. Download the correct Nintendo SDK
  3. Download the correct Nintendo project files, unzip into the UE4 directory
  4. Open the visual studio installer, then you need to customize the install and choose Game Development With C++, as you’ll need those components
  5. Click Setup.bat
  6. Click Generate Project Files.bat
  7. Open the .sln file generated
  8. Choose the target architecture above x64 and need to build it as ‘Development Editor’.
  9. Click Build
  10. Wait many hours
  11. in your ue4 folder, under Engine\Binaries\win64 run ue4editor
1 Like

Did those steps resolve your problem?

Yes they did, although I used 4.26.2, which wasn’t broken, and worked perfectly.

1 Like