I have been able to build my windows form application that access databases in SQL Server. All parts of the application are able to access the server apart from the part whe
it's been a year since you've asked this question.. but i just want to give the solution for this question...
if you using VS2010, go to your Project Properties, go to Compile, Advanced Compile Option, then set your target CPU to x86 or x64... cannot be both... choose one...
hope this solved.. :)
Using Visual Studio 2010 I had to go to Project Properties -> Build Tab: Change "Platform target" from "Any CPU" to "x86"
This cleared up the warning message for me.
keywords: Referenced assembly targets a different processor than the application
This is a bug with Visual Studio, it seems. Here's a more elaborate thread that explains some steps you can take to fix this.
This error can also occur after a Windows 10 update if certain DLLs that you're using have been deregistered somehow. This is now the third time this has happened - and it causes normally fine CPU settings to appear broken.
For me this keeps happening with Microsoft.mshtml
- every major Windows 10 update!! - including the April 2018.
Quick steps:
gacutil /l | find "Microsoft.mshtml"
C:\Windows\assembly\GAC\Microsoft.mshtml
dir
and change to the directory regasm Microsoft.mshtml.dll
http://techninotes.blogspot.com/2016/08/fixing-cannot-find-wrapper-assembly-for.html
Using Visual Studio 2010 I went to Main Menu --> Build --> Configuration Manager...
From there it's pretty obvious. Theres a big table. Each of your projects is a row. Look at the "platform" column. Change those entires to match each other.