Build On BuildServer fails - Advanced Installer Community
pimboden40
Posts: 22
Joined: Wed Jun 04, 2014 3:42 pm

Build On BuildServer fails

Hello.
I builded my solution on my dev Machine and all works. Then I checked it in and wanted to Build it on our Build-Server. It fails with following error:
The system cannot find the path specified.
I then went into my Buildserver and tried to executed manually from a command prompt too see what happens.. Even stranger: sometime a get the error as above, but sometimes I get
Could not copy template file from 'C:\Program Files (x86)\Caphyon\Advanced Installer 11.2.1\templates\template.msi' to 'E:\Build\work\b4511ac8726ec9e9\src\Agent
InstallerServer\AgentInstallerServer-SetupFiles\AgentInstallerServer.msi'. Error
: Access is denied.
After I tried the same command on a Command-Prompt started with "Runas administrator" the project Builds

My Build agent (TeamCity Build Agent) is running with an Account that is in the Administrators group

Any Ideas how to solve this?

Thank you

Teamcitiy's Log:
  • [16:25:34][MSBuild] src\AgentInstallerServer\My.Namesspace.AgentInstallerServer.aiproj.metaproj: Build target: Rebuild
    [16:25:34][src\AgentInstallerServer\My.Namesspace.AgentInstallerServer.aiproj.metaproj] Rebuild
    [16:25:34][Rebuild] MSBuild
    [16:25:34][MSBuild] src\AgentInstallerServer\My.Namesspace.AgentInstallerServer.aiproj: Build target: Rebuild
    [16:25:34][src\AgentInstallerServer\My.Namesspace.AgentInstallerServer.aiproj] Rebuild
    [16:25:34][Rebuild] Exec
    [16:25:34][Exec] "C:\Program Files (x86)\Caphyon\Advanced Installer 11.1\bin\x86\AdvancedInstaller.com" /rebuild "AgentInstallerServer.aip"
    [16:25:34][Exec] The system cannot find the path specified.
    [16:25:34][Exec] E:\Build\work\b4511ac8726ec9e9\src\AgentInstallerServer\My.Namesspace.AgentInstallerServer.aiproj(69, 5): error MSB3073: The command ""C:\Program Files (x86)\Caphyon\Advanced Installer 11.1\bin\x86\AdvancedInstaller.com" /rebuild "AgentInstallerServer.aip" " exited with code 3.
    [16:25:34][src\AgentInstallerServer\My.Namesspace.AgentInstallerServer.aiproj] Project src\AgentInstallerServer\My.Namesspace.AgentInstallerServer.aiproj failed.
    [16:25:34][src\AgentInstallerServer\My.Namesspace.AgentInstallerServer.aiproj.metaproj] Project src\AgentInstallerServer\My.Namesspace.AgentInstallerServer.aiproj.metaproj failed
.[/list].
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Build On BuildServer fails

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm not sure why this happens. Can you please make sure that the user under which you are launching the build operation have write permissions on your build output location? Also, please make sure the build output location is not opened in Windows Explorer while building the project (sometimes this scenario could generate such errors).

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pimboden40
Posts: 22
Joined: Wed Jun 04, 2014 3:42 pm

Re: Build On BuildServer fails

Well thanks for the reply. Yes I'm sure I have right, the Build Agent is an administrator.
I'm building a pretty large solution so It is guaranteed the agent has all rights.
No I'm not locking the file

I finally gave up. Told Visual Studio not to Build the Project and Added a new Build Step in TeamCity for Building from Command Window... That worked
craigg
Posts: 1
Joined: Fri Oct 17, 2014 2:36 pm

Re: Build On BuildServer fails

I realise this is relatively old but I think after some hacking I found the solution...(in my case at least)

The original install package was done on a 32 bit machine, when checked in to the server which is a 64 bit machine the build fell over....

On closer inspection in the aiproj project, there is a xml element with the path to the AdvancedInstaller.com executable. Use a text editor of sorts....

This is saved as : <AiComPath>C:\Program Files\Caphyon\Advanced Installer 11.3\bin\x86\AdvancedInstaller.com</AiComPath>

On the original machine(32 bit) <-- Works. The path to the executable is C:\Program Files\Caphyon\blah blah
On the server (64 bit) <-- fails. The path to the executable is C:\Program Files (x86)\Cayphon\blah blah

Changing the path in the aiproj file fixed the build.

Changed to : <AiComPath>C:\Program Files (x86)\Caphyon\Advanced Installer 11.3\bin\x86\AdvancedInstaller.com</AiComPath>

Hope this prevents someone else from tearing their hair out.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Build On BuildServer fails

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

Indeed, your related behavior is caused by a limitation of our Advanced Installer Extension for Visual Studio. In order to avoid this issue you can either delete the related <AiComPath> row within the .aiproj file or, as you already found, you can adjust the AdvancedInstaller.com install location.

Starting with our latest Advanced Installer version (11.5) the AdvancedInstaller.com install location is isn't written in the .aiproj file, so you should not encounter this issue in Advanced Installer setup projects created with AI 11.5 and newer versions.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
LaughingJohn
Posts: 39
Joined: Wed Aug 11, 2010 1:05 pm

Re: Build On BuildServer fails

Sorry to jump in on this conversation, but I've had similar issues. You mention that 11.5+ fixes this problem, but how do I upgrade my aiproj to the new format? I tried just deleting the AiComPath but it keeps coming back! I'm using VS2013 and AI 11.6.3.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Build On BuildServer fails

Hello,

I'm not sure why this happens. After deleting the above row the related issue should not appear in the newer versions (e.g. 11.6.3) of Advanced Installer. Can you tell us from which version of AI are you upgrading the .aiproj to AI 11.6.3? Also, if you could iterate a test case which we can follow to replicate the issue this will be very useful.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Build On BuildServer fails

Hello,

I've tested the above scenario (by upgrading AI from 11.4.1 to 11.6.3) and, indeed it seems the path to "AdvancedInstaller.com" is still added hardcoded in the .aiproj file even after deleting it. This seems to be an Advanced Installer issue. I've opened a task in our bug tracking system to investigate and fix this. Thank you for bringing it to our attention. We'll update this thread as soon as a fix will be available.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
LaughingJohn
Posts: 39
Joined: Wed Aug 11, 2010 1:05 pm

Re: Build On BuildServer fails

Thanks, just thought I'd mention that simply removing AICompath causes the build to fail (when using msbuild anyway) as it's referenced in the aiproj build steps "Build" and "Rebuild":


<Target Name="Build">
<!--Create the output directory-->
<!-- <MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" /> -->
<!-- Run the advanced installer on the .aip project - build -->
<!-- Path to the Advanced Installer version used to build .aip is specified in the registry HKEY_CURRENT_USER\SOFTWARE\Caphyon\Advanced Installer\Extension for VS -->
<Exec Command=""$(AiComPath)" /build "%(Compile.Identity)" $(AdvinstCmdLine)" />
</Target>
<Target Name="Rebuild">
<!--Create the output directory-->
<!-- MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" /> -->
<!-- Run the advanced installer on the .aip project - rebuild -->
<Exec Command=""$(AiComPath)" /rebuild "%(Compile.Identity)" $(AdvinstCmdLine)" />
</Target>
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Build On BuildServer fails

Hello,

A fix will be added in our next version of Advanced Installer (11.8). We'll update this thread as soon as the next version will be out.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Build On BuildServer fails

Hello,

This was fixed in version 11.8 of Advanced Installer released on January 28th, 2015.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”