.NET 32 bit app migrating to 64 bit platform

Posted on 2013-01-18
Last Modified: 2013-01-22
I have taken over a Windows Form Application that was written in Visual Stidio for a target framework of .NET 2.0.  Written for 32 bit machines.  We are now migrating the machines to 64 bit.    The project was compiled with a Target Platform of "Any CPU" which I believe means it will go to whatever type of platoform the machine that it is on has.  
However we would like to continue to run this app as a 32 bit on the 64 bit mahcine, which if I have been reading correctly would make the whole app run in the WOW64 folder(which I believe is bascially an emulation of 32 bit??).  The issue is when I go to change the target platoform to recompile the project to Active(x86) to make it strctily 32 bit I end up with some  TYPE MoverBoxControl.List BoxArrows is not defined erros which I can't resolve.
I am not sure why when the platform is "Any CPU" there is no errors yet when you change to "X86" platform these errors arise.  I thought it may have to do with a Namespace or Reference that the app has missed but have not been succesfule with that yet. Since these errors happen in the Windows Form Designer Code section and so far I have been unable to change anything in the Form to try and alleviate these error messages.  
Any help to point me in the right direction so I can get this app working properly on a 64 bit machine would be appreciated.  Thanks

Question by:lva6600311
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
LVL 96

Expert Comment

by:Bob Learned
ID: 38796155
That problem would suggest that you have multiple projects, and the type that you are looking for is in a project that can't be used as a reference to another project...
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38796381

Did you tried setting Platform Target to x64?

Moreover, can you show the error details, when you set to x86? Are you using any third party controls?
LVL 40
ID: 38796902
The MoverBoxControl seems to be something that you have built internally or go from a consultant. When searching for it, the only hits on that object links to messages from Mike Kienenberger.

If you have the source code for that control, try to make sure it is compiled for x86. 32-bits applications can have problems accessing 64-bits components.
Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.


Author Comment

ID: 38805610
Thanks for the comments.  I did not see the control in a different project although there is a reports installer project along with the one I am having issues in. I have noticed this morning that when I build in X86 mode I have assemblies that can no longer be "located".  The error states "Could not resolve this reference. Could not locate assembly..."  They are resolved and located fine when built with "Any CPU" chosen but not when on X86 or X64. One of these dll's is for the WindowsControlLibrary1 which I believe is for this MoverBoxControl.  I am now going to try resolving this issue to see if it resolves my initial question with Type not defined.  Any tips on the latest are welcome.  Thanks

LVL 23

Assisted Solution

by:Roopesh Reddy
Roopesh Reddy earned 250 total points
ID: 38806541

In that case, you may have to build the dependent assemblies first with x86 or x64 mode, and then try building the main one!

Hope it helps u...
LVL 40

Accepted Solution

Jacques Bourgeois (James Burger) earned 250 total points
ID: 38806563
The name of the Library says a lot. WindowsControlLibrary1 is the default name for one of the templates in Visual Studio. This really points to something done in-house by somebody who does not care enough to give proper names to what he creates.

You might have the source code for that library somewhere. This might enable to recompile it so that it solves the problem. A quick search on the Internet for the control returns a few posts by the same programmer. His name could help you locate the source.

You might also try to see if the control is still used by the application. If not, you could remove the reference. You can easily check for that by activating the Unused References... button on the references tab of the project`s properties.

Author Comment

ID: 38807045
Thank You for the replies.  I actually removed the references to those DLL's and added them back into the project and it resolved the issues.  I am not sure if this makes a difference but I was also reading when researching this issue that sometimes you need to put these dll's into a folder other then the BIN folder. I created a new folder and added them there which also worked but decided to kee[p them in the BIN folder as once they were readded the issues were resolved.  So I am not sure if putting them in a different folder makes a difference.    Thanks

LVL 40
ID: 38808113
The BIN folder is usually (not always) the best place to locate a dll, but not if you place it there yourself. You need to let the system do it for you.

When you reference one of your own dlls, Visual Studio makes a copy of the dll that you reference in the BIN directory, so the versions of the reference and the dll matches. If you then copy another version of the dll in the BIN manually, the reference and the dll do match anymore. The compiler accepts code from the information in the reference that might not be good for the dll.

What probably happened in your situation is that when you recreated the references, you "rematched" the reference and the dll. Problem solved.

The morale: do not "play" with the files in the projects directory through Windows Explorer unless you understand what you are doing. Let Visual Studio handles those directories. If for some reason you want to reorganize them (rename files, create subdirectories and the likes), always do it through Solution Explorer that has options to do so through its context menus.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question