How do I persuade a VS2005 msi to upgrade?

后端 未结 3 1624
没有蜡笔的小新
没有蜡笔的小新 2021-02-06 10:09

I have a Windows service written in C# using VS2005.

The installation is via a wizard that calls msiexec to install the msi file also created using VS2005.

I am

3条回答
  •  情书的邮戳
    2021-02-06 10:43

    An easier way to manage this is to REMOVE the AssemblyFileVersion from all assemblies, including the main executable and all the managed DLLs.

    In each of your AssemblyInfo.cs files, I recommend doing something like this if you don't care about the version numbers, but want to have some traceability.

    [assembly: AssemblyVersion("1.1.*")]
    // don't need this [assembly: AssemblyFileVersion("1.0.0.0")]
    

    Everything still compiles fine, and if you don't have the AssemblyFileVersion defined, then the installer assumes that everything is different every time (which is probably fine if you are installing all of the DLLs next to the main EXE).

    I spent a long time figuring this out, especially if I don't want to have to increment anything manually!

提交回复
热议问题