How to check if assemblies are precompiled. - 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!

phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

How to check if assemblies are precompiled.

Hello,
I added to my setup some files and want to precompile them. I added them into assemblies and added the following settings.
Precompile.png
Precompile.png (16.37 KiB) Viewed 15979 times
How can I check if the assembly is precompiled. I don't find them under the folders: c:\Windows\assembly\NativeImages_v...\

Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to check if assemblies are precompiled.

Hello,

Advanced Installer uses the Microsoft.NET "ngen.exe" tool to precompile assemblies at install time.

To verify the assembly state, you can navigate to your machine's latest installed .NET framework directory and run the following command from an elevated cmd shell:

Code: Select all

ngen display <YOUR_ASSEMBLY_NAME>
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

Re: How to check if assemblies are precompiled.

Thanks for your quick response. I know it with ngen. But nothing (of my assemblies) will be displayed. What could this be?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to check if assemblies are precompiled.

Hello,

I am not sure why this is happening. Can you please send us the verbose log of the installation via e-mail to support at advancedinstaller dot com so we can investigate it?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to check if assemblies are precompiled.

Hello,

This behavior is caused by a bug in Advanced Installer. Thank you for bringing it to our attention, I have discussed the issue with the development team and we will include a fix for a future release.
  • Here is the workaround you can try for your particular case if you have access to your .MSM file:
    - edit it with Orca.exe
    - go to the Property table
    - change the following

    Code: Select all

    Property : AI_ModuleId.162E4ADE_44E2_46D2_975F_F8A27A0B9201 
    Value : 162E4ADE_44E2_46D2_975F_F8A27A0B9201
    
  • In case you do not have access to your Merge Module, just add a "Property set with Formatted" custom action after the Begin in the InstallExecuteSequence of your main project. It should set the same property described above.
Please let us know how it turned out.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

Re: How to check if assemblies are precompiled.

Hello,
I tried it with your workaround. It works (partial), but:
  • This workaround is a problem for our automatic buildprocess. It can not be handled automatically.
  • In my installationlog appears "ngen.exe uninstall myfile.dll" and "ngen.exe install myfile.dll", but when I check it with "ngen.exe display", nothing is found
When will be the "future release" will be released?

Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to check if assemblies are precompiled.

Hello,

Can you please send us the .AIP (project) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Unfortunately I cannot give out the exact date, however it will be included in our next release which is scheduled sometime next month.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

Re: How to check if assemblies are precompiled.

Ok, files sent with email.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to check if assemblies are precompiled.

Hello,
This workaround is a problem for our automatic buildprocess. It can not be handled automatically.
I edited my previous post to underline the two workarounds. The second one requires a one time edit in your main project .AIP( not the Merge Module project ) so it won't interfere with your automatic build process.
In my installationlog appears "ngen.exe uninstall myfile.dll" and "ngen.exe install myfile.dll", but when I check it with "ngen.exe display", nothing is found
We have looked into the log file you sent and cannot find the implementation of either workarounds. Please make sure everything is set like I suggested and then retest the package.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

Re: How to check if assemblies are precompiled.

Hello,
at first, thanks for your help.

I'm not sure if I did the right settings. I opened my mergemodule with orca.
Orca.png
Orca.png (82.19 KiB) Viewed 15926 times
Is this right?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to check if assemblies are precompiled.

Hi,

You are welcome, glad to assist.

In the Property column you should changed AI_ModuleId to:

Code: Select all

AI_ModuleId.162E4ADE_44E2_46D2_975F_F8A27A0B9201
After this change everything should work fine.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

Re: How to check if assemblies are precompiled.

And the value of this property to the same value?

Code: Select all

162E4ADE_44E2_46D2_975F_F8A27A0B9201
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to check if assemblies are precompiled.

Hi,

Yes, this is correct. As I suggested in my initial post, the .MSM edit workaround is to append the value GUID to the AI_ModuleId property.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ifoko
Posts: 35
Joined: Tue Apr 12, 2011 5:10 pm
Contact: Website

Re: How to check if assemblies are precompiled.

I think I have the same problem.

I want to install several .Net as native image but I do not see them in ngen.

Where can I find the .MSM file?

regards
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to check if assemblies are precompiled.

Hello,

The behavior from this thread was caused by a bug in Advanced Installer which was fixed in version 8.3. Can you please upgrade to our latest version and test the package again?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”