Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve warning "Referenced assembly targets a different processor than the application"

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 where one can back up/restore a database. In this part I can not access the databases on the server and have come to believe it is because of these warnings. What do the followings exactly mean and how can I correct them?

 Referenced assembly   'c:\Program Files\Microsoft SQLServer\90\SDK\Assemblies\Microsoft.SqlServer.Replication.dll'    targets a different processor than the application  Referenced assembly   'C:\Windows\assembly\GAC_32\Microsoft.SqlServer.BatchParser\9.0.242.0_89845dcd8080cc91\Microsoft.SqlServer.BatchParser.dll'   targets a different processor than the application. 
like image 670
akalmas Avatar asked Jul 14 '10 08:07

akalmas


1 Answers

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.. :)

like image 74
Roland Andreas Avatar answered Sep 23 '22 16:09

Roland Andreas