VS 2010 build actions without external executables
Is it possible to include tasks in a build, in VS 2010, to e.g. update an assembly version number, without having to run an external application through a build event? That is, I would prefer if I could write an extension for VS 2010 that would lis开发者_如何转开发ten for a 'build starting' event, and run a task, e.g. a macro or plugin that updates the assembly version property.
You could write a custom MSBuild task.
Or, you could use an existing add-in. Here is one available on CodePlex which could potentially suite your needs by either A) achieving exactly what you want or B) allowing you to delve into how you could achieve what you want.
On a side note, if incrementing the version number/s is all you want, the VS should still support using a wildcard character to get this done via the AssemblyVersion in the assembly information file. For example:
[assembly: AssemblyVersion("1.*")]
精彩评论