I want to rename the project exe output in visual studio 2010.
Following the post
Rename project output before being included into Setup project
I always get the error The command rename ... exited with code 1
My command is:
rename $(TargetDir)$(TargetFileName) newname.exe
Right-click on the project name & click reload the project. Then rename the project name as highlighted below & save. It will automatically rename the . csproj file.
Post-build event will only run when the compiler's output file (.exe or . dll) is different than the previous compiler output file. Thus, a post-build event is not run if a project is up-to-date.
Here is a correct command for the Post-build event
rename "$(TargetPath)" "newname.exe"
I want to rename the project exe output in visual studio 2010.
I suggest you go into the project settings and change the output assembly name then. That's going to be far simpler and more reliable than using a post-build event.
It's possible that the fact that your current post-build command has an unmatched double-quote is the problem, but I wouldn't try to fix it - I'd just avoid it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With