C# .NET app's product version not updating in Control Panel -> Program -> Uninstall a program

夙愿已清 提交于 2021-02-05 11:05:59

问题


I'm having trouble updating a C# application's product number. I updated the [assembly: AssemblyVersion("0.0.4.4")] and [assembly: AssemblyFileVersion("0.0.4.4")] in AssemblyInfo.cs. Then build a new MSI setup file. Then I proceed with uninstalling & installing the new version of the app. However, in Control Panel's Uninstall a program, my app keeps showing its product version as 0.4.3. Meanwhile, right-click & bring up properties of the app's EXE file shows the correct version number (4.4). I also changed the app's GUID (using Visual Studio's Tools -> Create GUID) as suggested by another StackOverflow answer but it's not making any difference. Please let me know how I can match the product version in Control Panel to that defined in the AssemblyInfo.cs. Thank you!


回答1:


So I guess my question wasn't clear enough. But I found a way to do it nonetheless, so I thought I'd share it:

Click on the Installer project -> In "Properties" panel (if you don't see the panel then Window -> Reset Layout), scroll down to the bottom till you see "Version". Set this version number to the number you want to appear in Control Panel.

And the AssemblyVersion & FileVersion seem to have nothing to do with the Version number. Or at least that what's I thought, someone correct me if I'm wrong.



来源:https://stackoverflow.com/questions/45337338/c-sharp-net-apps-product-version-not-updating-in-control-panel-program-u

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!