Shootergame rename from launcher still doesn't work

I downloaded 4.6.1, got a copy of shootergame, made a new project from it called something else when prompted. Press the compile button in the editor and get the same error as was demonstrated here:

Its mentioned in that answer that it was “fixed” but clearly that fix hasn’t been propagated to any of the recent builds. So I thought I’d bring up the bug again, see if we can’t get a fix that actually fixes this issue.

I’d also be quite interested to hear exactly what IS causing this issue. I’m assuming its some declaration somewhere hidden in the bowels of the unreal build tool code .cs files?

In fact, it’d be super useful if someone in the know at epic could actually write out what EXACTLY happens with this build setup. Which values are when, what files are loaded and where from etc. Because its pretty arcane and impenetrable right now.

Thanks for your time.

Hey -

The cause of this issue is the target files inside the Source folder of the project not being created properly and referring to “ShooterGame” rather than the named the project is changed to. For the time being, as Mrb83 states in the post you mentioned it is possible to change the file name from ShooterGame.Target.cs to “[NewProjectName].Target.cs” as well as ShooterGameTarget class inside the file to [NewProjectName]Target. At the time I had verified that this had been resolved, however we will investigate this issue further as testing today showed that it has begun occurring again.

Cheers

Thanks . So its literally just the Target inside the .cs files and the .cs files themselves being named incorrectly? Gotcha. Thanks for the update.

Awesome, this fixed the issue for me too. Thank you!

Issue still occurring in 4.7. Cannot figure out how to get the stated workaround working :confused:

Hey andersh-

For a 4.7 version of ShooterGame there are three files in the Source folder for your project. These files are ShooterGame.Target.cs , ShooterGameEditor.Target.cs , ShooterGameServer.Target.cs.

What you will want to do is remove “ShooterGame” from each of these file names and replace with the new name of your project. Then you need to open each file and change the class name and constructor by removing ShooterGame and replace it with your project name then save each file.

At this point you should be able to open your project and compile successfully. I believe the reason the previous workaround wasn’t working for you was that the [ProjectName]Server.Targer.cs file is new to 4.7.

Cheers

I created a new project called Test based on the Puzzle template and I get this error in 4.7.1. I’m not able to build any type of Binary - windows or Android :frowning:

Hey evans-

Are you referring to building in Visual Studio or creating a packaged version of the game? Have you tried changing the file name of the _Target.cs and _Editor.Target.cs files as well as the class declaration and constructor in each of thoes files to match the project name?

I ran into a similar problem just trying to build the basic code project using the 4.7.2 source code build off github and deploy to Windows. The problem I’m having seems to be in the automatic generation of arguments for the UnrealBuildTool.exe:

What it’s getting when I try to deploy to in editor (note the optional arg prior to project path) :

...\UnrealBuildTool.exe Test Win64 Development -generatemanifest "...\Test.uproject"  -noxge -NoHotReloadFromIDE

What it presumably should be:

...\UnrealBuildTool.exe Test Win64 Development "...\Test.uproject" -generatemanifest -noxge -NoHotReloadFromIDE

Hey Naremus-

It sounds like you are referring to packaging a completed game rather than to opening a project after changing the name. If this is the case it would be best for you to open a new post so that the different issues can be tracked and supported separately.

Hi. I just wanted to say that I tried this workaround but had no luck. :frowning:
I changed name and content of the target.cs files as described, but it would still give some ShooterGameEditor rules error. Why would this still happen after changing the target files?

Hey -

Which version of the engine are you working in? Also, after changing names of the files try right clicking on the .uproject file and selecting “GenerateProjectFiles”.