.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Building a 64-bit version of the "My First Plugin" tutorial?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
vze26m98
653 Views, 3 Replies

Building a 64-bit version of the "My First Plugin" tutorial?

Greetings-

 

I'm a newbie to Windows and AutoCAD, trying to get the "My First Plugin" VB Tutorial to run with a 64-bit version of AutoCAD 2010. I'd like to get this working instead of installing a 32-bit edition of AutoCAD, which I suppose is the path of least resistance.

 

I'm grateful for any pointers anyone would offer.

 

I'm running recent Windows 7, AutoCAD 2010 64-bit (a student version), Visual Studio/Visual Basic 2010 Express, ObjectARX for 2011 for 32 & 64, AutoCAD .NET wizards 2010-12.

 

I'm able to build the test plugin, and it will launch AutoCAD without any complaints. If I do NETLOAD, it throws the error "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."

 

So, if I look at my .vbproj.user file, it appears that it wants to reference things in the ...\inc\inc-win32 directory. Also, if I look at the "runtime versions" of the AcMgd and AcDbMgd DLLs as shown in the VS Properties window, they are listed as 2.0.50727. The .NET frameworks referenced have a runtime version of 4.0.30319, and are found in the Program Files (x86) directory, not in a 64-bit-friendly location.

 

It seems that at least I have to configure Visual studio to reference 64-bit versions of the VB compiler, .NET frameworks and DLLs. None of this is made very easy by VS Express's unwillingness to permit configuration of the project files.

 

But what to do?

 

Again, thanks for any pointers!

 

Best wishes, Charles Turner

3 REPLIES 3
Message 2 of 4
arcticad
in reply to: vze26m98

http://stackoverflow.com/questions/3190014/how-to-build-64-bit-visual-basic-net-in-visual-studio-201...

---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 3 of 4
vze26m98
in reply to: arcticad

Thanks for your response, but actually, it turned out that the version of the .NET framework should be 3.5 for AutoCAD 2011, and not VB 2010 Express' default to 4.0:

 

http://spiderinnet1.typepad.com/blog/2011/11/versions-of-autocad-net-framework-runtime-and-visual-st...

 

The framework version can be set (after a project has been created) in the Properties window->Compile options. Look for the "Advanced Compile" options button below left.

 

Also, on the References options, you'll need to delete the reference to "System.xaml" as it apparently isn't a part of 3.5. The options window will tell you that it doesn't exist.

 

These were the only changes needed. The default "Any CPU" option is sufficient for the plugin to run on x64.

 

Cheers, Charles

Message 4 of 4
arcticad
in reply to: vze26m98

Glad I could be of no help whatsoever. 🙂

---------------------------



(defun botsbuildbots() (botsbuildbots))

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost