Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

TeamCity Plugin: Error Opening File

I've been having this issue with several AIP files when using the TeamCity plugin to build the projects. It doesn't happen with all the AIP's, but it happens pretty consistently. I have had issues with this in CCNET as well and the only way I could get around it is to run the build using a batch file and passing the attrib -r on the AIP files before building and then attrib +r afterwards.

From what I can see, it seems that the AIP has readonly set on it and when it tries to build, it fails, but what I don't understand is why it will work with one, but not for others. The AIP's are checked into TFS and pulled down locally on the Agent server. Here is the excerpt from the TeamCity log:

[07:40:12]Running Advanced Installer
[07:40:11]Step 6/10: Build Mongo Configurator MSI (Advanced Installer) (1s)
[07:40:12][Step 6/10] Starting: "C:\Program Files (x86)\Caphyon\Advanced Installer 13.8.1\bin\x86\AdvancedInstaller.com" /execute \\SERVERNAME\f$\TFS\Development\ImageService\Release\Installs\MongoConfigurator.aip C:\TeamCity\buildAgent\temp\globalTmp\aic371276866553526579.tmp
[07:40:12][Step 6/10] in directory: F:\TFS\Development\ImageService
[07:40:12][Step 6/10] Build
[07:40:12][Step 6/10]
[07:40:12][Step 6/10] Checking builds status
[07:40:12][Step 6/10] Build required.
[07:40:12][Step 6/10]
[07:40:12][Step 6/10] [ DefaultBuild ]
[07:40:12][Step 6/10] Building package (en): \\SERVERNAME\c$\InstallerStaging\MongoConfigurator.msi
[07:40:13][Step 6/10] Creating MSI database
[07:40:13][Step 6/10] Writing Summary Information
[07:40:13][Step 6/10] Build time: 1 sec.
[07:40:13][Step 6/10]
[07:40:13][Step 6/10] Total build time: 1 sec.
[07:40:13][Step 6/10]
[07:40:13][Step 6/10] Build finished successfully.
[07:40:13][Step 6/10] Process exited with code 0
[07:40:13]Running Advanced Installer
[07:40:13]Step 7/10: Build ImageService MSI (Advanced Installer) (2s)
[07:40:13][Step 7/10] Starting: "C:\Program Files (x86)\Caphyon\Advanced Installer 13.8.1\bin\x86\AdvancedInstaller.com" /execute \\SERVERNAME\f$\TFS\Development\ImageService\Release\Installs\ImageService.aip C:\TeamCity\buildAgent\temp\globalTmp\aic4069054494315719393.tmp
[07:40:13][Step 7/10] in directory: F:\TFS\Development\ImageService
[07:40:15][Step 7/10] Build
[07:40:15][Step 7/10]
[07:40:15][Step 7/10] Checking builds status
[07:40:15][Step 7/10] Build required.
[07:40:15][Step 7/10]
[07:40:15][Step 7/10] [ DefaultBuild ]
[07:40:15][Step 7/10]
[07:40:15][Step 7/10] Total build time: 0 sec.
[07:40:15][Step 7/10] Error opening file: "\\SERVERNAME\f$\TFS\Development\ImageService\Release\Installs\ImageService.aip".
[07:40:15][Step 7/10]
[07:40:15][Step 7/10] Build finished because an error was encountered.
[07:40:15][Step 7/10] Process exited with code -536805276
[07:40:15][Step 7/10] Step Build ImageService MSI (Advanced Installer) failed
[07:40:15][Step 7/10] Error message is logged
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: TeamCity Plugin: Error Opening File

Hello,

More likely this has to do with the way your TFS build server is configured to handle the project file during check in /check out, etc. operations. Please try to contact your TFS server admin and ask him how to avoid the read only attribute set on the AIP file.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Re: TeamCity Plugin: Error Opening File

Thank you Daniel,

I will look into that, but for the time being I have added a command line build step to remove the readonly attribute before AI steps & one after to add it back.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: TeamCity Plugin: Error Opening File

You're welcome.

I'm glad you have a workaround solution.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”