In the project properties compile tab select "any cpu" for the platform and your project will run on both 32 and 64 bit systems.



Registered forum members do not see this ad.
Subject: Making Vb.net projects portable on 64 & 32 bit machines.
Programs: AutoCAD 2010, VS 2008 and SharpDevelop 3.0 Visual Basic Editor.
I am just starting VB.net with AutoCAD. I am wondering if it is possable to
put my projects on an external USB drive and use them on my 32 bit machine
at home and my new 64 bit machine at work.
When I installed VS 2008 on my 32 bit machine at home I noticed that
there is a 64 bit option. I have not installed VS 2008 on the 64 bit machine
so I don't know what I am going to run into at this point.
Instead of using Microsoft VS 2008, I have used SharpDevelop
3.0 to run VB projects on my work machine. I like SharpDevelop 3.0 because you
do not have to install it on your computer. With modifications, you can place
SharpDevelop 3.0 on a USB drive and run from there.
I had a little success getting my VB projects to run with AutoCAD but
I am using SharpDevelop 3.0 instead of Mircosoft Visual Studio 2008. It is difficult to me
follow VB.net tutorials with Develop Sharp 3.0 because they use Microsoft Visual Studio.
The reason I want to use SharpDevelp 3.0 instead of MS Visual Studio is I don't have to
install VS on my work computer.
Any suggestions on how to make my projects portable?
Thank you,
In the project properties compile tab select "any cpu" for the platform and your project will run on both 32 and 64 bit systems.
Engage brain before mouth
"The German who types with a Yorkshire accent" - Dave Broada 2o1o



My platform is set for "Any Cpu"
I had a good run on my 32 bit machine but when I go to the 64 bit machine I get
errors. On the 32 bit machine I am using AutoCAD 2010. On the 64 bit machine I
am using AutoCAD 2010. I think it is having problems loading the acdmgd.dll and
asmgd.dll files. Any suggestions to solve this problem?
Thank you,
Not come across that one before. Try renaming the two dlls and then replacing them using the repair option from the installations DVD.
I somestimes get an issue if all of the references or resources are not the same on the two computers, but otherwise all of my .NET projects run without a hitch on 32 and 64 bit machines.
Engage brain before mouth
"The German who types with a Yorkshire accent" - Dave Broada 2o1o
This query has a couple of variable that could make a definitive answer rather difficult - SharpDevelop/VS, 32bit/64bit.
Isolating one variable at a time may help pinpoint the problem. Start a new project, something fairly basic, but only use SharpDevelop. Use that to debug on both machines. I know I ran into a couple of 32bit/64bit issues when developing for AutoCAD 2009. Some of those issues may still exist in 2010 and, conceivably, will be easier to discover if the SharpDevelop/VS compatibility is removed as a potential problem area.
It may be quite possible to use both IDEs to develop one project, but I wouldn’t attempt it until I had the project working pretty well in one of them.
With regard to acdmgd.dll and asmgd.dll compatibility:
How are these two dll referenced? It is advisable to download and install the appropriate ObjectARX SDK and have that available on any computer used for development. Instead of referencing C:\Program Files\Autodesk\AutoCAD 2010\acdbmgd.dll (for instance) the project should reference . . . \ObjectARX 2010\inc\AcDbMgd.dll



I think both acdmgd.dll and asmgd.dll are path dependent.
One thing I would like to know is acdmgd.dll and asmgd.dll exist for differ versions.
So is there acdmgd.dll and asmgd.dll for 32 bit machines and
different acdmgd.dll and asmgd.dll for 64 bit machines. If so
I guess there these files are not interchangable.
So it is best to use install ObjectARX 2010 for both machines
and referance acdmgd.dll and asmgd.dll files from that package?
The 64 bit machine has 2012 on it. So will the ObjectARX 2010
work for it?
Another think to consider, does Netframework versions have to
be the same?
Thank you,
Last edited by muck; 6th Mar 2012 at 07:18 pm.
Yes, the 64bit and 32bit versions of acdmgd.dll and asmgd.dll would be different. One of the benefits of using those files from ObjectARX 2010\inc is that the references for the netloaded DLL will automatically be directed to the correct location.
I think the eventual game plan is that .NET routine will run on either 64- or 32 bit without any extra effort from the programmer. Unfortunately, the .NET API is still fairly new and some (very few) incompatibilities do exist.
Ideally, when developing for different releases of AutoCAD, you would target the .NET version applicable to the lowest version (that would be .NET 3.5 for AutoCAD 2010/2012 platforms).



Where is acdmgd.dll and asmgd.dll in the Obj 2012 ARX package for 64 bit?
Where is acdmgd.dll and asmgd.dll in the Obj 2012 ARX package for 32 bit?
I know the 2010 package will not work on the 2012 machine because of the path
issue.
Thank you,
Registered forum members do not see this ad.
Look in the ObjectARX 2010\inc folder.
The files will have some capital letters:
AcDbMgd.dll
AcMgd.dll
I installed the ObjectARX SDK directly on the C drive of both of the machines I use for development. One machine is Windows XP 32 Bit, the other Windows 7 64 bit.
A Visual Studio solution file will have the references set to look in that location and, due to the similar directory structure, will find what it needs to allow development at either workstation.
When the solution file is compiled (on either machine) the plugin will be pre-set to look in the appropriate location on the user's computer - at runtime - to find the actual acdbmgd.dll and asmgd.dll files. They will be in the same folder as acad.exe and the plugin will use whichever version it finds there.
Bookmarks