Yesterday was my first encounter with your AI product. I appreciated its VS extension and .aiproj as they are the way to go.
But they are not suitable for out-of-the box builds in TFS, so:
Request 1
In case of TFS build, installer(s) produced must be placed in $(OutDir) or in sub-directory of it (configurable in .aip). This must happen by default.
Motivation: At TFS we have 2 folders per build: Source/(src) and Binaries/(bin). Sources contains data fetched from source control system, and Binaries contains artefacts produced by the build.
Build results (Binaries/bin) folder is exported by TFS to its consumers (via Drop folder).
Building installer under Source folder (next to .aip file) makes Installer missing from build results.
Request 2
.aiproj file contains hard-coded path (as at developer's machine) to Advanced Installer.
Scenario:
When Ai version changes (or developer installed AI at non-standard location), all .aiproj files must be edited in order to switch to location of new version.
This is error-prone and not scalable, as it may require modification of codelines already shipped to customers.
Requirement:
.aiproj file must automatically discover location of (latest version of) Advanced installer executable.
(This may happen via $([MSBuild]::GetRegistryValue()) or $(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Caphyon\Advanced Installer\...))
In case .aip files are not backwards-compatible location of required AI version must be found.
regards,
Delcho
P.S. Bellow are some workarounds and thoughts I tried in order to get installer files to $(OutDir)
[*] It is not possible to hard-code output path in .aip files, because it is different for local, TFS10 (folder named Binaries) and TFS11 builds (folder named bin).
[*] In editor for AIP files I was not able to find property which refer to Solution/project output directory, thus I am not able to create post-build event which publish installer to build results.
Anyway, such variable is available in .aiproj file $(OutDir), as it is set by msbuild workflow activity.
[*] No possibility to set this $(OutDir) property as parameter to AI in .aiproj file, as no such parameter exists for /build command (besides it is bad idea to edit generated project files, partly because they can be automatically overwritten)
[*] if $(OurDir) is set as Env.variable, it cannot be used as [%env_variables] as this syntax is available when .msi/.exe is being installed and not when build.
So I end with this workaround:
Appended these 2 lines before existing <Exec> task, at both Build and Rebuild targets:
Code: Select all
<Exec Condition="'$(OutDir)'!=''" Command="attrib -R "%(Compile.Identity)"" />
<Exec Condition="'$(OutDir)'!=''" Command=""$(AiComPath)" /edit "%(Compile.Identity)" /SetOutputLocation -buildname DefaultBuild -path "$(OutDir)"" />
Anyway this is temporary workaround. It is not acceptable to enforce all developers to edit by hand .aiproj files and to require they have some understanding of msbuild specifics. This is error-prone and not scalable.
Also, these commands must be again changed by hand when "buildname" is changed or more builds are created.
P.S.S Dummy demo project attached, although not really required