[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 359
  • Last Modified:

.NET 32 bit app migrating to 64 bit platform

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
lva6600311
Asked:
lva6600311
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
Bob LearnedCommented:
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
 
Roopesh ReddyCommented:
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
 
Jacques Bourgeois (James Burger)Commented:
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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
lva6600311Author Commented:
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
 
Roopesh ReddyCommented:
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
 
Jacques Bourgeois (James Burger)Commented:
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
 
lva6600311Author Commented:
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
 
Jacques Bourgeois (James Burger)Commented:
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now