In my latest project, I need to get a folder from somewhere else. But I want to automatically get the latest version when I build. I have a batch file which will do the copy folder operation.
In order to do this, I added the folder once in my project. Then I was able to synchronize it in the Files&Folders window. Then I added a pre-build event that calls the batch file. This way, I expected that before building the Advanced Installer package, the batch file would be executed and collect the latest version of my folder. According to this page http://www.advancedinstaller.com/user-g ... vents.html that's what I thought I should do.
Wrong.
If I look at my build output, it looks like it builds BEFORE calling my pre-build event batch file. If I delete the folder, it will simply refuse to build because the synchronized folder is missing (was not copied by the pre-build event yet).
Here is what it looks like if the folder is already present:
Here is what it looks like if the folder is deleted:------ Rebuild All started: Project: MyProject Setup, Configuration: Advinst ------
"C:\Program Files (x86)\Caphyon\Advanced Installer 10.2\bin\x86\AdvancedInstaller.com" /rebuild "MyProject Setup.aip" -buildslist AnyCPU_Release
Running C:\Users\mstarnaud\Desktop\myfile.bat... done.
Checking builds status... done.
Build required.
[ AnyCPU_Release ]
Building package (en): C:\Users\mstarnaud\Desktop\SlimUp\Web Container\trunk\MyProject Setup\AnyCPU_ReleaseSetupFiles\MyProject.msi
...and the rest goes here
Any ideas?------ Rebuild All started: Project: MyProject Setup, Configuration: Advinst ------
"C:\Program Files (x86)\Caphyon\Advanced Installer 10.2\bin\x86\AdvancedInstaller.com" /rebuild "MyProject.aip" -buildslist AnyCPU_Release
The source folder "C:\Users\mstarnaud\Desktop\MyFolder" of the synchronized folder "TempFolder" is missing from disk. You need to either recreate the source folder path or reset the synchronization from the "Folder Properties" dialog, in "Synchronize" tab.
C:\Users\mstarnaud\Desktop\MyProject\MyProject Setup.aiproj(44,5): error MSB3073: The command ""C:\Program Files (x86)\Caphyon\Advanced Installer 10.2\bin\x86\AdvancedInstaller.com" /rebuild "MyProject Setup.aip" -buildslist AnyCPU_Release" exited with code 536805277.
Done building project "MyProject Setup.aiproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========