Собственные образы.NET, созданные с помощью NGEN, не загружаются

Я использовал NGEN для создания собственных образов нескольких сборок, используемых моим приложением. Однако эти изображения не загружаются при запуске приложения, и я понятия не имею, почему.

Это типичный журнал от 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, расположенный в C :\Windows\Microsoft.NET\Framework\v4.0.30319 \ и целевой платформой моей сборки является.NET Framework 4. Я не перекомпилировал сборку после создания собственного образа.

Будем признательны за любую помощь.

10
задан Odsh 2 May 2012 в 12:41
поделиться