开发者

Version Number of App in executable name

开发者 https://www.devze.com 2022-12-16 05:15 出处:网络
I\'d like to set the builds name in Visual Studio to something like that: MyApp_{VERSION}_x32.exe Under project settings I can define the 开发者_StackOverflow社区Output file name \"Release\\MyApp.exe

I'd like to set the builds name in Visual Studio to something like that: MyApp_{VERSION}_x32.exe

Under project settings I can define the 开发者_StackOverflow社区Output file name "Release\MyApp.exe"

Any ideas?


Start by adding a new property sheet to your project. Name it as you like, then open it with the property manager view. Now:

  1. add a new user defined property, name it Version and set it to your value of choice
  2. set your output file (in link editor) to $(OutDir)\$(ProjectName)_$(Version).exe


You could write a renamer app that can grab the VERSION from an exe and rename it accordingly.

In the project that you would like to compile to MyApp_{VERSION}_x32.exe for example. You could set the post build project option to run the renamer app on the exe currently being compiled.

So everytime you build your app the rename app gets ran, it then renames the newly built exe.

I hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消