मैंने अपने आवेदन द्वारा उपयोग की जाने वाली कई असेंबली की मूल छवियां बनाने के लिए एनजीएनएन का उपयोग किया है। हालांकि, एप्लिकेशन चलाने पर उन छवियों को लोड नहीं किया जाता है और मुझे नहीं पता कि क्यों।एनजीईएन के साथ बनाए गए .NET मूल छवियों को लोड नहीं किया गया है
यह fuslogvw से एक विशेष लॉग है:
*** Assembly Binder Log Entry (2/05/2012 @ 13:29:04) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\MyDir\MyApp.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = ***\***
LOG: DisplayName = MyAssembly, Version=1000.0.0.0, Culture=neutral, PublicKeyToken=null (Fully-specified)
LOG: Appbase = file:///C:/MyDir/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MyApp.exe
Calling assembly : PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: Start binding of native image MyAssembly, Version=1000.0.0.0, Culture=neutral, PublicKeyToken=null.
WRN: No matching native image found.
LOG: IL assembly loaded from C:\MyDir\MyAssembly.dll.
और वह विधानसभा के बारे में ngen.exe से जानकारी:
C:\MyDir>ngen display MyAssembly.dll
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
NGEN Roots:
C:\MyDir\MyAssembly.dll
NGEN Roots that depend on "C:\MyDir\MyAssembly.dll":
C:\MyDir\MyAssembly.dll
Native Images:
MyAssembly, Version=1000.0.0.0, Culture=neutral, PublicKeyToken=null
मैं ngen.exe सी में स्थित इस्तेमाल किया: \ Windows \ माइक्रोसॉफ्ट.NET \ Framework \ v4.0.30319 \ और मेरी असेंबली का लक्ष्य ढांचा .NET Framework 4. मूल छवि बनाने के बाद मैंने असेंबली को पुन: संकलित नहीं किया।
किसी भी मदद की सराहना की जाएगी। C:
बहुत बढ़िया, त्वरित और सही उत्तर हंस के लिए धन्यवाद। एक बहुत अच्छी तरह से प्रलेखित प्रश्न के लिए – Odsh
+1, आपने इसे मदद करने में आसान बना दिया है। –