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

**URL:** <https://forums.unrealengine.com/t/generateprojectfiles-bat-fails-when-trying-to-build-initial-ue4-source-project-files-with-switch-access/248325>\
**Category:** C++\
**Tags:** Switch, unreal-engine, Engine-Source-Code, GitHub\
**Created:** [August 31, 2021, 8:38pm UTC](https://forums.unrealengine.com/t/generateprojectfiles-bat-fails-when-trying-to-build-initial-ue4-source-project-files-with-switch-access/248325 "2021-08-31T20:38:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [August 31, 2021, 8:38pm UTC](https://forums.unrealengine.com/t/generateprojectfiles-bat-fails-when-trying-to-build-initial-ue4-source-project-files-with-switch-access/248325/1 "2021-08-31T20:38:27Z")

</div>

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 . . .

---

<div class="post-metadata">

**Author:** ![Manu\_Fury\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Manu\_Fury\_2](https://forums.unrealengine.com/u/Manu_Fury_2)\
**Post date:** [December 14, 2021, 5:10pm UTC](https://forums.unrealengine.com/t/generateprojectfiles-bat-fails-when-trying-to-build-initial-ue4-source-project-files-with-switch-access/248325/2 "2021-12-14T17:10:44Z")

</div>

Did you find out the way solve this?

---

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [December 14, 2021, 5:28pm UTC](https://forums.unrealengine.com/t/generateprojectfiles-bat-fails-when-trying-to-build-initial-ue4-source-project-files-with-switch-access/248325/3 "2021-12-14T17:28:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [January 13, 2022, 12:15am UTC](https://forums.unrealengine.com/t/generateprojectfiles-bat-fails-when-trying-to-build-initial-ue4-source-project-files-with-switch-access/248325/4 "2022-01-13T00:15:14Z")

</div>

Did those steps resolve your problem?

---

<div class="post-metadata">

**Author:** ![Manu\_Fury\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Manu\_Fury\_2](https://forums.unrealengine.com/u/Manu_Fury_2)\
**Post date:** [January 23, 2022, 11:39am UTC](https://forums.unrealengine.com/t/generateprojectfiles-bat-fails-when-trying-to-build-initial-ue4-source-project-files-with-switch-access/248325/5 "2022-01-23T11:39:04Z")

</div>

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