Silverlight - C ++ DLL坏图像格式异常

时间:2012-10-12 13:59:14

标签: silverlight silverlight-4.0 badimageformatexception

我有一个我用C ++项目构建的DLL。我间接在Silverlight项目中引用了这个dll(我的意思是,web项目引用了一个C#项目,后者又使用了这个dll)。 现在,每当我构建我的Silverlight应用程序时,我都会得到这个

    Error   1   The "CreateRiaClientFilesTask" task failed unexpectedly.
System.Web.HttpException (0x80004005): Could not load file or assembly 'MyDll' or one of its dependencies. An attempt was made to load a program with an incorrect format. ---> System.Configuration.ConfigurationErrorsException: Could not load file or assembly 'MyDll' or one of its dependencies. An attempt was made to load a program with an incorrect format. ---> System.BadImageFormatException: Could not load file or assembly 'MyDll' or one of its dependencies. An attempt was made to load a program with an incorrect format.

我的silverlight web项目引用其他C#项目没有任何问题。如果我删除对C ++ DLL的引用,一切似乎都没问题。

我厌倦了两种不同的选择

  1. 我用32位和64位构建了c ++ dll,但错误没有改变
  2. 当我构建c ++ dll时,我将.net配置文件更改为客户端版本,仍然没有更改
  3. (Am Silverlight 5)

    有人可以帮我理解发生了什么吗?

    由于 ķ

0 个答案:

没有答案