1

我打开了一个项目并将其框架从 4.5 更改为 4.0(由于一些愚蠢的公司的限制)。

There was a mismatch between the processor architecture of the project being built


"MSIL" and the processor architecture of the reference "My.DataAccessLayer.DimensionDB",
 "x86". This mismatch may cause runtime failures. Please consider changing the targeted 


processor architecture of your project through the Configuration Manager so as to align 

the processor architectures between your project and references, or take a dependency on 


references with a processor architecture that matches the targeted processor architecture of your project.

这是一个警告。无论如何,当我运行时,它会给我以下错误:-

The type or namespace name 'Membership' does not exist in the namespace 'Microsoft.AspNet' (are you missing an assembly reference?)

The type or namespace name 'Membership' does not exist in the namespace 'Microsoft.AspNet' (are you missing an assembly reference?)

等等

我将非常感谢任何帮助。

谢谢

4

1 回答 1

3

基本上,您的应用程序的目标是AnyCPU,但它引用x86程序集。

您应该将目标更改为x86以解决这些警告(并使其成功运行)。

请注意,在 4.5 中,这仍然会运行,因为默认包含(4.5 中的新)“首选 32 位”选项,这导致AnyCPU仍然使用 x86。

于 2013-08-28T20:56:39.187 回答