1

我有一个从 C++ 项目构建的 dll。我在 Silverlight 项目中间接引用了该 dll(我的意思是,Web 项目引用了一个 C# 项目,而 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 配置文件更改为客户端版本,但仍然没有变化

(我在 Silverlight 5 上)

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

谢谢K

4

0 回答 0