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

前端 未结 2 735
心在旅途
心在旅途 2021-02-18 15:03

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.

相关标签:
2条回答
  • 2021-02-18 15:23

    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")
    
    0 讨论(0)
  • 2021-02-18 15:32

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

    0 讨论(0)
提交回复
热议问题