elou
Posts: 96
Joined: Tue Apr 14, 2015 9:12 am

ngen error when assembly beeing registered

Hello,
I want to make usage of the precompiled feature for dotnet applications.
For that porpose I've marked my exe as Assembly in advanced installer and check the "Generate native image for private assembly".
After installation, the apllication will NOT be registered.
In install.log I can see that the ngen step show an error:

Code: Select all

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install "S1, Version=0.1.21719.0, Culture=neutral, PublicKeyToken=d436eab7900e45b5"Microsoft (R) CLR Native Image Generator - Version 4.8.3752.0
Copyright (c) Microsoft Corporation.  All rights reserved.
Uninstalling assembly S1, Version=0.1.21719.0, Culture=neutral, PublicKeyToken=d436eab7900e45b5 because of an error during compilation: Das System kann die angegebene Datei nicht finden. (Exception from HRESULT: 0x80070002).
Das System kann die angegebene Datei nicht finden. (Exception from HRESULT: 0x80070002)
When I call this command be hand I also become an error because it's a wrong syntax.
The correct syntax would be:

Code: Select all

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install "S1.exe"
Do I missing something or is this an issue?
Regards, Éric.
elou
Posts: 96
Joined: Tue Apr 14, 2015 9:12 am

Re: ngen error when assembly beeing registered

After some tries I was able to pre-compile my application. I have to set the destination to "Private install to original path".
In fact what I want is not move my library to the GAC be make usage of the generated native image.
Never the less there is an issue in AI when the asembly should be located in the GAC and a native image should be generated.
Regards,
Éric.
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: ngen error when assembly beeing registered

Hello Éric,

First of all, I am glad you got this working.

This is currently under our investigation.

Please give us some more time to further look into this and I will come back to you as soon as I will have a resolution.

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

Re: ngen error when assembly beeing registered

Hello Éric,

In order for me to further investigate this, could you please forward me the following resources:

- a copy of your .AIP file

- the verbose log of the installation process

- a download link of the setup

by e-mail at support at advancedinstaller dot com?
Never the less there is an issue in AI when the asembly should be located in the GAC and a native image should be generated.
In what regards this, could you please give me some more details about what the issue is?

Earlier, you have mentioned that your assembly does not register. My question here would be, does the assembly not register at all? Or, for instance, it registers as an assembly but not as a native image?

In addition to that, how have you tested if your assembly is registered? Have you used the ngen.exe display command or have you used another method? If you have used another method, could you please let me know which?

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
elou
Posts: 96
Joined: Tue Apr 14, 2015 9:12 am

Re: ngen error when assembly beeing registered

Hello Catalin,
Thanks for your reply.

I've tried to create a dummy project to reproduce this issue, but I can't AI has always done the job correctly.
The assembly seems not to compile, probably due to dependencies which are not in GAC.
The only issue I could see for AI is that it do not catch the error.
Regards,
Éric
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: ngen error when assembly beeing registered

Hello Éric,

Thank you for your followup on this.

I see. Unfortunately, we can not catch every error in Advanced Installer, especially errors that are related to something outside of Advanced Installer.

Please let me know if there is anything else I could help you with and I will gladly assist.

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

Return to “Common Problems”