This is a migrated thread and some comments may be shown as answers.

ngen fails on WinForms build 1203

3 Answers 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Uwe Honermann
Top achievements
Rank 1
Uwe Honermann asked on 01 Feb 2010, 11:09 AM
Hello,

since we have major performance problems with WinForms (esp. RibbonBar takes more than 10 seconds to load),
we tried to improve performance by precompiling the control with ngen.
This failed with the following message (Windows 7 x64):

c:\dev\Research\DocView_UWE\X64>\Windows\Microsoft.NET\Framework64\v2.0.50727\ngen "Telerik.WinControls.UI"

Microsoft (R) CLR Native Image Generator - Version 2.0.50727.4927
Copyright (c) Microsoft Corporation.  All rights reserved.
Installing assembly Telerik.WinControls.UI
Failed to find dependencies of image Telerik.WinControls.UI because of the follo
wing error: Das System kann die angegebene Datei nicht finden. (Exception from H
RESULT: 0x80070002)
    Compiling assembly Telerik.WinControls.UI ...
Error compiling Telerik.WinControls.UI: Das System kann die angegebene Datei nic
ht finden. (Ausnahme von HRESULT: 0x80070002)
Uninstalling assembly Telerik.WinControls.UI because of an error during compilat
ion.
Das System kann die angegebene Datei nicht finden. (Exception from HRESULT: 0x80
070002)

Any idea, that is causing this error ?

Regards,
  Uwe

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 02 Feb 2010, 12:47 PM
Hi Uwe Honermann,

Thank you for writing. I saw from the exception: "The system cannot find the file specified." that the NGEN cannont find all depending dlls. So i presume that you should run Ngen.exe in a folder that contain all Telerik assemblies in order to help Ngen resolve the assemblies.

Hope this helps.

Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Uwe Honermann
Top achievements
Rank 1
answered on 02 Feb 2010, 01:51 PM
Hi Peter,

all Telerik assemblies are in the GAC, so NGEN should find them, shouldn't it ?

Regards,
   Uwe
0
Peter
Telerik team
answered on 02 Feb 2010, 03:07 PM
Hello Uwe Honermann,

Thank you for the provided details. Yes, you are right - I will quote the MSDN article for NGen.exe:

When locating assemblies and their dependencies, Ngen.exe uses the same probing logic used by the common language runtime. By default, the directory that contains ClientApp.exe is used as the application base directory, and all assembly probing begins in this directory. You can override this behavior by using the /AppBase option.

But the issue cannot be reproduces if you run NGen.exe in a folder that contains all Telerik.WinControls.UI.dll's dependences, so I could assume that your GAC contains more than one version (or version that is different from the application ocal folder dlls) of Telerik.WinControls.UI.dll dependence and that leads NGen.exe to fails.

Hope this helps.

Kind regards,
Peter
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
General Discussions
Asked by
Uwe Honermann
Top achievements
Rank 1
Answers by
Peter
Telerik team
Uwe Honermann
Top achievements
Rank 1
Share this question
or