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!

zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Apply template to Visual Studio setup project

I have a template AI project that I have used. I would like to use that template when I create an AI setup project from within Visual Studio. Is this possible? At the moment it looks like it creates a very simple project from within Visual Studio. I can go into AI proper to edit it but I don't have any means of applying my own custom template.

Thanks

David
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Apply template to Visual Studio setup project

Actually, I have just upgraded to 10.5 from 10.3 and I can create the AI project in Visual Studio but as soon as I double click on the AI Setup Project1.aip I get the error message

Could not load file or assembly 'AdvInstExtensionProjectEditor.vcs11, Culture=neutral' or one of its dependencies. The system cannot find the file specified

:(
Teodor
Posts: 73
Joined: Thu Jul 25, 2013 9:56 am

Re: Apply template to Visual Studio setup project

Hi
zeiddev wrote:Actually, I have just upgraded to 10.5 from 10.3 and I can create the AI project in Visual Studio but as soon as I double click on the AI Setup Project1.aip I get the error message

Could not load file or assembly 'AdvInstExtensionProjectEditor.vcs11, Culture=neutral' or one of its dependencies. The system cannot find the file specified
We are aware of this bug and we are working to fix it ASAP. So far it appears to be reproducible only on Windows 8 with Visual Studio 2010. Do you have a different development environment?

Best regards
Teodor Micu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Apply template to Visual Studio setup project

I am on Windows 7 Ultimate - 32 bit. Visual Studio 2010

David
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Apply template to Visual Studio setup project

From within the main Advanced Installer application I do not appear to be able to select my custom template any more. It is there but as soon as I select create project nothing happens. If I go to a different project type e.g. .NET Application and then back to my custom template and select that followed by create project, it attempts to start the .NET Application wizard!

David

edit:
I have just noticed that if I instead double click on my custom template (instead of pressing create project) this works.
Teodor
Posts: 73
Joined: Thu Jul 25, 2013 9:56 am

Re: Apply template to Visual Studio setup project

Hi
zeiddev wrote:Actually, I have just upgraded to 10.5 from 10.3 and I can create the AI project in Visual Studio but as soon as I double click on the AI Setup Project1.aip I get the error message

Could not load file or assembly 'AdvInstExtensionProjectEditor.vcs11, Culture=neutral' or one of its dependencies. The system cannot find the file specified
A fix for the problem you reported was included in the latest version of Advanced Installer (v10.5.1) released on September 6th, 2013. Please upgrade and let us know if it works properly.

Best regards
Teodor Micu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Apply template to Visual Studio setup project

I upgraded to 10.5.1 but I am getting a different error message when I try to create an AI project.
Capture.PNG
Capture.PNG (10.79 KiB) Viewed 20211 times
David
Teodor
Posts: 73
Joined: Thu Jul 25, 2013 9:56 am

Re: Apply template to Visual Studio setup project

Hi

I'm not sure why this happens. You can try to execute the following command as Administrator to reinitialize the Visual Studio 2010 extensions:

Code: Select all

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /setup
Also, please make sure you're up-to-date with the security updates from Microsoft otherwise this might be a regression already fixed like it was for example in the You receive a DISP_E_UNKNOWNNAME error.. article.

If your problem persists, can you offer more information to continue the investigations?
What operating system are you using, what version of Visual Studio and Advanced Installer are you using? Did you use side-by-side to keep older versions of Advanced Installer?

Best regards
Teodor Micu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Apply template to Visual Studio setup project

Hi,

I ran the devenv.exe /setup but it didn't seem to help. I am fully up to date with security patches etc. I am running Windows 7 Home edition 32 bit, Visual Studio 2010 Professional. I am using AI 10.5.1. I do not have any other version currently installed.

Thanks

David
Teodor
Posts: 73
Joined: Thu Jul 25, 2013 9:56 am

Re: Apply template to Visual Studio setup project

Hi

Since we cannot reproduce this DISP_E_UNKNOWNNAME error, we rely on all informations you can provide to find the cause. Thus, please tell us what you can find in two places:
  • debug information from the Output tab in Visual Studio after you receive the above error
  • any message logged by Visual Studio in the system Event Viewer
Best regards
Teodor Micu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Apply template to Visual Studio setup project

When I do this in Visual Studio there are no output messages. I am also not sure where to look in the event viewer. I could not see any obvious messages but if you are able to point me in the right direction I can take another look.

This is only happening on one machine. My other machine works fine. The only difference is the version of Visual Studio. They are both 2010 but one is Professional and the other is Ultimate. Of course there could be issues on the machine which mean it is not working.
Teodor
Posts: 73
Joined: Thu Jul 25, 2013 9:56 am

Re: Apply template to Visual Studio setup project

Hi
zeiddev wrote:This is only happening on one machine. My other machine works fine. The only difference is the version of Visual Studio. They are both 2010 but one is Professional and the other is Ultimate.
I've installed Visual Studio 2010 Ultimate (32-bit) but still I cannot reproduce the problem you reported.
zeiddev wrote:Of course there could be issues on the machine which mean it is not working.
So far this is the only logical conclusion.

Best regards
Teodor Micu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Apply template to Visual Studio setup project

Sorry, I should have been clearer. The machine with the errors has Visual Studio Professional. The Ultimate one works fine.

However it does seem as though it may be the machine.

This does bring me back to my original question in this thread though about applying a template to a visual studio setup project. Is this possible?

Thanks

David
Teodor
Posts: 73
Joined: Thu Jul 25, 2013 9:56 am

Re: Apply template to Visual Studio setup project

Hi
zeiddev wrote:This does bring me back to my original question in this thread though about applying a template to a visual studio setup project. Is this possible?
Yes, this can be done. I'll summarize the procedure for adding your own Advanced Installer Project template.

The files for the Advanced Installer extension in Visual Studio 2010 are located at:

Code: Select all

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Caphyon\Advanced Installer 10.5.2
Note: this path contains the Advanced Installer version (ie. 10.5.2) to emphasize that the extension applies to that particular version. Thus, on upgrades you must manually redo this procedure to keep your custom AI template for Visual Studio.

Our default project template is loaded by Visual Studio from:

Code: Select all

ProjectTemplates\AIProject\1033\AI_for_VS_Project_Template.zip
You can edit this archive to contain you template OR you can create a new zip archive for your template. Obviously, we recommend the second approach.

This is the procedure for adding your own Advanced Installer Project template in Visual Studio.
  • copy AI_for_VS_Project_Template.zip to AI_CUSTOM_TEMPLATE.zip -- this will be the archive for your custom template
  • edit AI_for_VS_Project_Template.vstemplate in AI_CUSTOM_TEMPLATE.zip. Just update the <Name> to be able to distinguish it in the Visual Studio new project dialog:

    Code: Select all

    <Name>Advanced Installer 10.5.2 Project -- Your Custom Template</Name>
  • replace AIInstallProject.aip file with your own AI template in AI_CUSTOM_TEMPLATE.zip
Make sure that your custom AI template contain these three elements so that your projects have unique GUID codes:

Code: Select all

<ROW Property="ProductCode" Value="1033:{$guid1$} " Type="16"/>
<ROW Property="UpgradeCode" Value="{$guid2$}"/>
<ROW Component="SetupMadeWith" ComponentId="{$guid3$}" Directory_="APPDIR" Attributes="4" KeyPath="SetupMadeWith"/>
If you have other questions, please let us know.

Best regards
Teodor Micu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Apply template to Visual Studio setup project

Perfect. I will give it a go. Thank you for your help.

David

Return to “Building Installers”