Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the output executable file name in Visual C++ 2010?

Tags:

visual-c++

Is there any way to change the output executable name (ProjectName.exe) to some custom name in Visual C++ 2010, without changing the project name?

Thanks.

like image 595
Alon Gubkin Avatar asked Jun 27 '10 20:06

Alon Gubkin


2 Answers

In the Project Properties under "Configuration Properties" -> "General," there is a property called "Target Name." It defaults to "$(ProjectName)" but can be changed to whatever you like.

Or, you can set it directly in the linker options under "Configuration Properties" -> "Linker" -> "General;" the property is called "Output File."

like image 70
James McNellis Avatar answered Oct 27 '22 05:10

James McNellis


In Visual Studio 2012+ you can proceed as answered by James accessing project properties and then you'll need to modify the value of "Assembly Name" field of Application tab.

In addition to that if your project is a WPF application you also need to rename all sources reference in xaml for ResourceDictionary, Image, etc... as follows:

Source="/YourAssemblyName;component/YourDir/YourFile.ext"

or if you are using uri in code

new Uri("pack://application:,,,/YourAssemblyName;component/YourDir/YourFile.ext")
like image 45
Zucch Avatar answered Oct 27 '22 04:10

Zucch