System.IO.FileNotFoundException: не удалось загрузить файл или сборку «X» или одну из его зависимостей при развертыванииC#

Место общения программистов C#
Ответить Пред. темаСлед. тема
Anonymous
 System.IO.FileNotFoundException: не удалось загрузить файл или сборку «X» или одну из его зависимостей при развертывании

Сообщение Anonymous »

У меня возникла странная проблема с развертыванием приложения, которое ссылается на сборку, написанную на управляемом C++.

Я создал сборку X, скомпилировал ее. и сослался на него в exe-файле под названием Starter.

Starter.exe нормально запускается на локальном компьютере. Однако, когда я копирую ВСЕ содержимое стартовой папки отладки на виртуальную машину и пытаюсь запустить ее там, происходит сбой со следующим исключением:

Код: Выделить всё

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or
assembly 'X' or one of its dependencies. The specified module could not be found.
Для меня это не имеет никакого смысла, поскольку X находится в той же папке, что и Starter.exe.

Что может быть причиной этой проблемы?

ОБНОВЛЕНИЕ

Я проверил зависимости Reflector на целевой машине и смог найти файлы для всех из них.

Я также изменил конфигурации на x86/win32 для всех проектов.

ОБНОВЛЕНИЕ

Вот журналы из журнала Fusion (расположение: C:\FusionLog\Default\Starter.exe\X, версия=1.0.4538.22813, Culture=neutral, PublicKeyToken=null.HTM):

Код: Выделить всё

*** Assembly Binder Log Entry  (6/4/2012 @ 1:56:13 PM) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:  C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Documents and Settings\Administrator\Desktop\tmp\k;k\Starter.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = MENKAUR-7683827\Administrator
LOG: DisplayName = X, Version=1.0.4538.22813, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Documents and Settings/Administrator/Desktop/tmp/k;k/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = Starter.exe
Calling assembly : Starter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Documents and Settings\Administrator\Desktop\tmp\k;k\Starter.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/Desktop/tmp/k;k/X.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Documents and Settings\Administrator\Desktop\tmp\k;k\X.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: X, Version=1.0.4538.22813, Culture=neutral, PublicKeyToken=null
LOG: Binding succeeds. Returns assembly from C:\Documents and Settings\Administrator\Desktop\tmp\k;k\X.dll.
LOG: Assembly is loaded in default load context.
Единственные ошибки находятся в каталоге C:\FusionLog\NativeImage\Starter.exe\:

Код: Выделить всё

*** Assembly Binder Log Entry  (6/4/2012 @ 1:56:13 PM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Documents and Settings\Administrator\Desktop\tmp\k;k\Starter.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = MENKAUR-7683827\Administrator
LOG: DisplayName = BookmarkWiz.Kernel, Version=1.0.4538.22813, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Documents and Settings/Administrator/Desktop/tmp/k;k/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = Starter.exe
Calling assembly : Starter, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: Start binding of native image X, Version=1.0.4538.22813, Culture=neutral, PublicKeyToken=null.
WRN: No matching native image found.
LOG: IL assembly loaded from C:\Documents and Settings\Administrator\Desktop\tmp\k;k\X.dll.
Я не могу подписать сборку, так как она ссылается на несколько других сборок, которые не подписаны

Подробнее здесь: https://stackoverflow.com/questions/108 ... r-one-of-i
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «C#»