문제

I've followed the steps described here to modify the ProductCode and ProductVersion on my setup project on each build, using a prebuild event.
(meaning- I created a console application that uses the above-mentioned code to modify the .vdproj file, and I trigger it from the pre-build event).

The operation is successful, and after the build is done I can see that the 'Version' property of the setup project has changed.

However, the 'ProductVersion' property of the compiled msi does not change.
Only if I build the setup project again, I can see that the 'ProductVersion' has changed.

Is it possible that the prebuild event occurs after the msi is compiled?

도움이 되었습니까?

해결책

I seem to recall having problems with the prebuild action on VDPROJ back around 2005 and we had to create fake C++ projects with build dependencies so we could use the postbuild of the C++ to do things before the VDPROJ build.

For the record, anything is possible (to fail) with VDPROJ. The tool is deprecated in the next release of Visual Studio because of it's shortcomings.

A postbuild SQL update of the Property table in the built MSI might be a better option. Switching to a different tool would certainly be a better option.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top