[ACCEPTED]-How to set a project's executable processname?-project
You can set this in the project's properties 8 page. Setting the assembly name on the application 7 tab will set the name of the resulting compiled 6 assembly (ie. ABC.exe).
The .vshost.exe is 5 the Visual Studio debugging process, used by Visual Studio when you debug. You 4 can turn that off (Visual Studio does not 3 need it to debug) by unchecking the "enable 2 the visual studio hosting process" checkbox 1 on the debug tab of the the project properties.
Changing "Assembly name" alone did not help 2 me.Changing Assembly title in AssemblyInfo.cs 1 file helped me to change process name.
The best you can do is to set the assembly name 14 in the property pages (Properties node in Solution 13 Explorer) to whatever you wish. The C# compiler 12 automatically uses the assembly name as 11 the process name (file name of the generated 10 EXE), so this should do the job for you. Note 9 that the assembly name is completely independent from 8 the project name and the root namespace.
You 7 can of course change the file name of the 6 EXE after it has been generated (and this 5 will leave the assembly name unchanged), though I 4 see no real reason for this.
Note: I assume 3 you are referring to Visual Studio in particular, though 2 it probably matters little in terms of what 1 is possible.
It seems it's taken from the version-info 8 resource for an .EXE; specifically, the 7 "FileDescription" attribute. To do this 6 programmatically, I imagine you would need 5 a separate program to update the version-info 4 resource in the .EXE whose description you're 3 trying to change. (I don' know C#, but 2 in C++, UpdateResource is used for this 1 purpose.)
The processes name in task manager is based 11 of the image name, which is the executable 10 (as already pointed out the assembly name 9 setting defines this in VS.Net).
The Application 8 Name is based on the window title, so is 7 only something you can alter with graphical 6 apps (except via dirty hacks to the console 5 which are unlikely to be stable).
Note that 4 you can have multiple executables all executing 3 a common main method in a shared dll so 2 you can 'name' different instances of essentially 1 the same code differently if that helps.
More Related questions