Avatar of Brian
Flag 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.

Microsoft Visual StudioVisual Basic.NET.NET Programming

Avatar of undefined
Last Comment

8/22/2022 - Mon

Oh, I see the problem!  I just need to figure out how to fix it now.


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.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

I took Andy's advice and change the architecture to x86 to match the 3rd party reference.
Your help has saved me hundreds of hours of internet surfing.