Click here to Skip to main content
15,895,781 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to build my solution for 64 bit CPU.
Initially i was facing following build issue

C#
An attempt was made to load an assembly with an incorrect format: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll.



I was able to fix it using

XML
<GenerateSerializationAssemblies>On</GenerateSerializationAssemblies>
    <SGenToolPath>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\</SGenToolPath>


Now i am facing the problem that

C#
An attempt was made to load an assembly with an incorrect format: C:\MyFolder\MyProject\obj\release\myproj.dll.


I am unable to understand why this error is coming


Also i can see following warnings
1. Possible problem detected while building assembly myproj: Referenced assembly 'mscorlib.dll' targets a different processor

2. Possible problem detected while building assembly myproj: Referenced assembly 'system.data.dll' targets a different processor

3. Possible problem detected while building assembly myproj: Referenced assembly 'system.web.dll' targets a different processor
Posted
Updated 22-Dec-15 23:47pm
v2
Comments
Nathan Minier 23-Dec-15 7:39am    
Check your windows version, is it the 64-bit OS?
AnkitaS12 27-Dec-15 22:26pm    
Yes Window 7 64 bit, Visual studio 2012
Nathan Minier 28-Dec-15 9:41am    
This article targets an older VS version, but appears to address the issue that you're having:
http://geekswithblogs.net/akraus1/archive/2011/12/10/148002.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900