0

I have an MSI installer project that installs a windows service.

For every release manually I have to change the Version number in the properties box.

For Ex: 1.0.35.

How do I change the same from the command line by passing a parameter instead of changing it in the solution file.

In the .proj file I use the following command to build by solution file.

<Exec Command="&quot;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe&quot; $(work_dir)\myproj\client\windows\msm32b\msm32b.sln /Build"/>

This command packages the binaries such as dll's, exe's, sys files etc as a MSI file. Currently I am changing the Version number manually in the properties box. How do I change the version from the command line.

4

1 回答 1

0

我不确定这是否适用于 MSI 项目,或者该解决方案是否适合您,但可能值得研究:

如果您引用的版本号与程序集版本相同(可使用 property 访问Application.ProductVersion),您可以使其至少最后一部分在每次构建时自动递增。

打开文件AssemblyInfo.csProperties在解决方案资源管理器的文件夹下找到)。在该文件的底部,显示了版本号。它应该如下所示:

[assembly: AssemblyVersion("1.2.3.4")]

如果你把它改成下面的,它的最后两部分会自动生成。

[assembly: AssemblyVersion("1.2.*")]
于 2013-01-31T11:32:23.300 回答