2013-08-28 24 views
1

我打開了一個項目並將其框架從4.5更改爲4.0(由於某些愚蠢的公司限制)。在將框架從4.0更改爲4.5後運行我的.net項目時出現問題

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

你確定這些都是問題,而不僅僅是警告?你應該可以繼續運行。 –

+0

你說得對。這是一個警告。當我運行時,出現了我剛剛粘貼的錯誤。 – Steve

回答

3

基本上,你的應用程序的目標是AnyCPU,但它引用x86組件。

您應該將您的目標更改爲x86以解決這些警告(並允許它成功運行)。

請注意,在4.5版中,由於默認值包含4.5中的新選項「首選32位」選項,因此AnyCPU仍然會使用x86,所以仍然可以運行。

+0

非常感謝。 – Steve

相關問題