# How to change the name of target build?

**URL:** <https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017>\
**Category:** Platform & Builds\
**Tags:** target, build, unreal-engine, name, question\
**Created:** [March 28, 2016, 9:41am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017 "2016-03-28T09:41:14Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_96465afa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_96465afa](https://forums.unrealengine.com/u/anonymous_user_96465afa)\
**Post date:** [March 28, 2016, 9:41am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/1 "2016-03-28T09:41:14Z")

</div>

Hi.  
I wanna try to rename the name of the target. But when i add this line

```
public MyProject2Target(TargetInfo Target)
{
	Type = TargetType.Game;
    Name = "NewName";
}

```

to _MyProject2Target()_ constructor of _MyProject2.Target.cs_ the compiler couldn’t build project.

```
"Error	CS0103	The name 'Name' does not exist in the current context	\Source\MyProject2.Target.cs	"

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [March 30, 2016, 8:27pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/2 "2016-03-30T20:27:39Z")

</div>

Hello ,

You can change the name of the .exe that is output by changing the class names in the .target.cs.

As an example:

```
public class MyProjectTarget : TargetRules
{
	public MyProjectTarget(TargetInfo Target)
	{
		Type = TargetType.Game;
	}

```

would change to:

```
public class NewExecutableNameTarget : TargetRules
{
	public NewExecutableNameTarget(TargetInfo Target)
	{
		Type = TargetType.Game;
	}

```

and the new name would be NewExecutableName.exe

Hope this helps!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_96465afa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_96465afa](https://forums.unrealengine.com/u/anonymous_user_96465afa)\
**Post date:** [April 5, 2016, 5:37am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/3 "2016-04-05T05:37:09Z")

</div>

Thanks for your answer.  
But i think when we change the name of the class and its constructor in .target.cs it couldn’t build.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [April 5, 2016, 12:16pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/4 "2016-04-05T12:16:50Z")

</div>

What types of errors do you receive when trying to build after changing these class names? Did you also remove the line you added in your previous attempt to change the name?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [April 11, 2016, 1:49pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/5 "2016-04-11T13:49:13Z")

</div>

We haven’t heard from you in a while, . Are you still having problems compiling the project after editing the .target.cs? If so, could you provide the list of errors as I mentioned in my last comment? In the meantime, I’ll be marking this issue as resolved for tracking purposes.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_96465afa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_96465afa](https://forums.unrealengine.com/u/anonymous_user_96465afa)\
**Post date:** [April 12, 2016, 5:21am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/6 "2016-04-12T05:21:26Z")

</div>

I’m so sorry. I’m a bit forgetful these days. When change the class name of build target to new name these 2 errors generated:

1. 

> Error MSB3073 The command ""D:\Epic

> Games\4.10\Engine\Build\BatchFiles\Build.bat"  
> MyProject2 Win64 Development  
> “D:\Unreal  
> Projects\MyProject2\MyProject2.uproject”  
> -rocket -waitmutex -2015" exited with code -1. MyProject2 C:\Program Files  
> (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 37

2.\> Error Expecting to find a type to be

> declared in a target rules named  
> ‘MyProject2Target’. This type must  
> derive from the ‘TargetRules’ type  
> defined by Unreal Build  
> Tool. MyProject2 D:\Unreal  
> Projects\MyProject2\Intermediate\ProjectFiles\EXEC 1

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [April 12, 2016, 12:48pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/7 "2016-04-12T12:48:39Z")

</div>

Could you post the entire .target.cs file? It would be helpful to be able to take a look to ensure everything looks correct.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_96465afa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_96465afa](https://forums.unrealengine.com/u/anonymous_user_96465afa)\
**Post date:** [April 13, 2016, 9:36am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/8 "2016-04-13T09:36:41Z")

</div>

Absolutely yes.

```
// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class FooTarget : TargetRules
{
	public FooTarget(TargetInfo Target)
	{
		Type = TargetType.Game;
    }

	//
	// TargetRules interface.
	//

	public override void SetupBinaries(
		TargetInfo Target,
		ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
		ref List<string> OutExtraModuleNames
		)
	{
		OutExtraModuleNames.AddRange( new string[] { "MyProject2" } );
	}
}

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [April 13, 2016, 1:01pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/9 "2016-04-13T13:01:43Z")

</div>

Hm, it looks correct. Is this something that you’ve only tried in your project or have you had a chance to try it in a new project? The reason I ask is because it’s possible that the existing code in the project is conflicting with these changes.Also, what build configuration are you using?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_96465afa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_96465afa](https://forums.unrealengine.com/u/anonymous_user_96465afa)\
**Post date:** [April 14, 2016, 7:56pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/10 "2016-04-14T19:56:00Z")

</div>

Win64, Development

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [April 14, 2016, 8:12pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/11 "2016-04-14T20:12:00Z")

</div>

Thank you for that. I apologize for the runaround where it seems like I’m trying to get you to try random things, but not being able the reproduce the issue is making it harder to debug this. With the new name in place, could you try doing a rebuild in the Development Editor configuration and see if that works for you?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_96465afa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_96465afa](https://forums.unrealengine.com/u/anonymous_user_96465afa)\
**Post date:** [April 16, 2016, 4:59am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/12 "2016-04-16T04:59:08Z")

</div>

I understand that you try to solve my problem. I have familiar with test scenarios and reverse engineering. So you can be relax with me. Take it easy dude! 🙂

I have run the project under Win64 Development Editor. The Editor runs normally.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [April 19, 2016, 1:17pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/13 "2016-04-19T13:17:39Z")

</div>

If that is the case, does that mean that the issue is resolved or is the editor not running correctly in a different configuration?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_96465afa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_96465afa](https://forums.unrealengine.com/u/anonymous_user_96465afa)\
**Post date:** [April 23, 2016, 5:05am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/14 "2016-04-23T05:05:56Z")

</div>

When i run the project under configuration of “Win64 Development Editor” the project runs with name “MyProject2 Editor” as i seen it before in splash screen. MyProject2 is previous name of the project. When i try to package the project under windows 64-bit the following error occurred:

> UnrealBuildTool: ERROR: Couldn’t find target rules file for target ‘Foo’ in rules assembly ‘MyProject2ModuleRules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [April 29, 2016, 2:56pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/15 "2016-04-29T14:56:11Z")

</div>

I apologize for the delay. Changing the name of the splash screen upon startup can be done in the project settings under Description \> About \> Project Name.

As for the error, I looked it up and it seems like a common fix for it is to delete your Binaries and Intermediates folders, re-generate your project files, and then compile. It seems to be something to do with one of the old generated files that were based off the old name causing issues.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_96465afa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_96465afa](https://forums.unrealengine.com/u/anonymous_user_96465afa)\
**Post date:** [May 7, 2016, 4:42am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/16 "2016-05-07T04:42:29Z")

</div>

I changed the project name under Description \> About \> Project Name but nothing changed.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_96465afa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_96465afa](https://forums.unrealengine.com/u/anonymous_user_96465afa)\
**Post date:** [May 7, 2016, 5:48am UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/17 "2016-05-07T05:48:50Z")

</div>

I have done these works:

1. Delete _intermediate_, _binary_ and _.vs_ folders and \*_.sdf_ file in root directory of project.
2. Change the name of the Project folder to _Foo_
3. Change of every file that have named "_MyProject2"_ to _Foo_
4. Substitute everything that has name _“MyProject2”_ to _Foo_ in _Source_ directory
5. Change ProjectName in _DefaultGame.ini_ Note: if you change the name of the game under Description \> About \> Project Name in editor, that doesn’t need to do this step.
6. Open Foo.uproject with a text editor and substitute _MyProject2_ with _Foo_ in modules section.
7. Right click on the Foo.uproject and click generate visual studio project.
8. Run Visual studio project and compile it.
9. That’s done.

everything now smells with _Foo_! 🙂

---

<div class="post-metadata">

**Author:** ![Alkbabic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alkbabic](https://forums.unrealengine.com/u/Alkbabic)\
**Post date:** [December 17, 2024, 6:12pm UTC](https://forums.unrealengine.com/t/how-to-change-the-name-of-target-build/352017/18 "2024-12-17T18:12:00Z")

</div>

Seems need not only rename .cs files and it inside, but and .cpp and .h all files and inside it search old names and replace it…  
for example UCLASS()  
class SD\_API ACPP\_char : public ACharacter  
replace to

UCLASS()  
class trampampam\_API ACPP\_char : public ACharacter. there trampampam is your new project name…
