VisualStudio & Advanced Installer - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

oradsa
Posts: 1
Joined: Thu Sep 06, 2012 6:43 am

VisualStudio & Advanced Installer

I am using Advanced Installer with Visual Studio 2010. I managed to create an .aip project, but when I want to add the files from the relevant VS projects, I have to choose the exact location of these files.

I want to use more then one build configuration so I can use config transforms to change my .config files depend on the build configuration I choose.

This is a problem for me because when I compile in Debug, the .exe and .dll files goes to bin\Debug, but when I compile in Staging these files goes to bin\Staging.

Is there any way to get Advanced Installer to get the right files, meaning get them from the target folder of the build configuration I chosen?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: VisualStudio & Advanced Installer

Hi and welcome to our forums,

Advanced Installer does not support this by default, but with a little bit of tweaking you can get this working. Let me explain how:
-- the first requirement is to have your output folders generated by VS in the same parent folder, as you have them both placed in "bin\".
-- now you need to open your project in Advanced Installer GUI and do the following:
---- create two builds in Media page, called Debug and Staging
---- create a property called "Configuration" or what name would you like, from Install Parameters page
---- in the New Property dialog you will have options to set per-build values for your property. Set them to "Debug" and "Staging", i.e. the names of the folders created by VS
---- now go to File -> Options -> Path Variables and define a new path variable with your full path for the debug/staging, the one you current have in the project.
---- from the Home tab, in the toolbar, use the "Convert Paths" wizard and then save the project.

Now, it comes the tricky part, you will need to edit the project file in a text editor, like Notepad++, capable of saving the file in UTF-8 format. Once you open the file look for this XML node:

Code: Select all

 <COMPONENT cid="caphyon.advinst.msicomp.AppPathsComponent">
<ROW Name="BIN_DIR" Path="<your path>\bin\Debug" Type="2" Content="0"/>
You might have multiple variables here if you are already using this feature. You need to edit the value and replace "Debug" with "[|Configuration]".

Now you can save and build the project and it should pickup the correct files for each of the two builds.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”