BadImageException on 64Bit Windows7 using c++\CLI assembly

I recently upgraded to a new 64 bit windows 7 computer from a 32 bit windows xp. I am attempting to create a c++\cli assembly in visual studio 2008 that will be used in an exe. I ran into problems with this and decided to just create an ultra-simple example. However, the simple project also displayed the same error (attached is screen shot of badimageexception error). I moved that example project back to my 32 bit machine and recompiled and ran it and everything worked fine. So it is obviously something to do with a discrepancy between 32 and 64 bit images. I googled this exception and this seemed to confirm this as well. However, I have tried changing every setting I can think of to force the system to build everything as 32 bit and it still blows up. I have gone into the configurations of both the app and lib and set everything to use Win32 and not "Any CPU", and the targeted machine in the c++ lib is MachineX86. I am not sure what else to try on this one to get it to actually compile and work on the new computer. Any help resolving this issue would be greatly appreciated. I tried to attach a zip with the VS projects, but I could not do so because of the completely assinine verification of the extension types. Instead I had to place it on my site. Here is a link to the zip file. (http://www.animatlab.com/CLI_Test.zip). I was able to add an image of the exception I get. I initially created a member of the library in the Load event of the app form, but the app totally died then without even giving me any info. I moved it into the code for a button press. So when you run the app the form appears and it is only when you hit the button and try to create one of the assembly classes that the badimage exception is thrown.
Exception.gif
davidc4887Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

feenixCommented:
You haven't set your VB application to be compiled as 32bit, it seems. Take properties of the VB application TestApp, Compile, Advanced Compile Options and there you still have AnyCPU. Change that to x86 and it'll work.

(I only have Visual Studio 2010 installed, so the settings could be a bit different on VS 2008)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.