我打开了一个项目,并将其框架从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?)
等
我非常感谢任何帮助。
由于
答案 0 :(得分:3)
基本上,您的应用程序定位于AnyCPU
,但它引用了x86
程序集。
您应该将目标更改为x86
以解决这些警告(并允许其成功运行)。
请注意,在4.5中,这仍然会运行,因为默认值包括(新的4.5)“首选32位”选项,这会导致AnyCPU
仍然使用x86。