Ошибка «Не удалось загрузить файл или сборку…» при использовании объекта ImageList

Вот сообщение об ошибке:

Не удалось загрузить файл или сборку. 'file: ///myFile.dll' или один из его зависимости. Была сделана попытка загрузить программу с неверным формат. Строка 171, позиция 5. FrmApproveProfiles.resx

Of course the file is not called "myFile.dll". The weird thing is that the error is apparently within the resource file for one of my forms, but this form is part of the main app and is completely separate from the aforementioned DLL file. This DLL file is loaded as a file (not a build of a project in the solution).

The error occurs when I load an image (any image i.e. png, bmp, etc) into the ImageList I have in my form (in the main app, not the DLL). I know the images are not corrupted because I can view them and use them elsewhere in the program and I am baffled as to why my separate DLL does not load because of this. Why should it care what I load into my other assemblies?

Totally stumped on this one. Anyone have any suggestions or encountered this before?

EDIT - This error occurs when I try to build the solution. The build fails in both Debug and release mode.

5
задан starblue 11 March 2011 в 06:56
поделиться