Link to home
Start Free TrialLog in
Avatar of Brian
BrianFlag for United States of America

asked on

Processor architecture mismatch warning in Visual Studio when building a VB.net program

When I build my vb.net project in Visual Studio, I get the below mismatch warning.  I have another program that is almost exactly the same and it does not give this error.  Both projects are using the same .net 4.5.1 framework and both are set to Any CPU on compile.  Any ideas why I'm getting this warning on the one project and not the other?  I'm sure it's some simple setting, but I can't figure out what it is.

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "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.


Avatar of Brian
Brian
Flag of United States of America image

ASKER

Oh, I see the problem!  I just need to figure out how to fix it now.
User generated image
Avatar of Brian

ASKER

So I have a 3rd party reference that is using x86 and I believe that is the cause of the warning.  I think I can ignore the warning because I have tested the program on multiple devices and it works every time.
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Brian

ASKER

I took Andy's advice and change the architecture to x86 to match the 3rd party reference.