alphonseg
Posts: 25
Joined: Sat May 25, 2019 1:49 am

How to Precompile VS 2017 Winforms Application

I'm evaluating Advanced Installer Professional edition and would like to have the installer precompile my application using ngen.exe.
I can't seem to find how to do that.
Could someone please explain it? I'm new to AI, so please dumb it down.
Catalin
Posts: 6600
Joined: Wed Jun 13, 2018 7:49 am

Re: How to Precompile VS 2017 Winforms Application

Hello,

If I understand correctly, you want Advanced Installer to build your VS Solution before building the setup package?

If this is the case, you can try to create a pre-build event that will launch ngen.exe with the required parameters in order to build your solution. For more information about "Build Events", please have a look on the following article: "Build Events Tab".

You can add a build event by going to "Builds" page --> "Build Events" tab.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alphonseg
Posts: 25
Joined: Sat May 25, 2019 1:49 am

Re: How to Precompile VS 2017 Winforms Application

Thanks for the reply, but AI will do that anyway.
I'm referring to the Precompile .NET assemblies item on your features page https://www.advancedinstaller.com/feats-list.html.
The process is done on the target machine using Windows' ngen.exe, during the installation.
This is the main reason that I want to purchase AI Professional.
Attachments
Capture.PNG
Capture.PNG (58.29 KiB) Viewed 2899 times
Catalin
Posts: 6600
Joined: Wed Jun 13, 2018 7:49 am

Re: How to Precompile VS 2017 Winforms Application

Hello,

Thank you for your followup on this and for the explanation.

It seems I have misunderstood your scenario, but now everything is clear.

In order to precompile your .NET assemblies, you can add your assemblies in the "Files and Folders" page.

After doing so, please go to "Assemblies" page and add click on the "Add assembly" button from the toolbar. This will allow you to select the assembly earlier added in "Files and Folders" page.

After selecting the assembly, you need to check the "Generate native image for private assembly" option in the "Type" --> ".NET" section.

precompile.png
precompile.png (37.85 KiB) Viewed 2895 times
For more information about this, please have a look over our "Assembly Properties" article.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6600
Joined: Wed Jun 13, 2018 7:49 am

Re: How to Precompile VS 2017 Winforms Application

You are always welcome!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”