Solved

.NET 32 bit app migrating to 64 bit platform

Posted on 2013-01-18
8
352 Views
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

Lance
0
Comment
Question by:lva6600311
  • 3
  • 2
  • 2
  • +1
8 Comments
 
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...
0
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38796381
Hi,

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?
0
 
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.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:lva6600311
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

Lance
0
 
LVL 23

Assisted Solution

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

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...
0
 
LVL 40

Accepted Solution

by:
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.
0
 

Author Comment

by:lva6600311
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

Lance
0
 
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.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

830 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