.NET

.NET

Reply
New Member
vze26m98
Posts: 2
Registered: ‎03-13-2013
Message 1 of 4 (338 Views)
Accepted Solution

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

338 Views, 3 Replies
03-13-2013 12:04 PM

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

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-studio.html

 

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

*Expert Elite*
arcticad
Posts: 1,286
Registered: ‎06-21-2004
Message 2 of 4 (332 Views)

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

03-13-2013 12:21 PM in reply to: vze26m98

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

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



(defun botsbuildbots() (botsbuildbots))
New Member
vze26m98
Posts: 2
Registered: ‎03-13-2013
Message 3 of 4 (306 Views)

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

03-13-2013 03:46 PM 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

*Expert Elite*
arcticad
Posts: 1,286
Registered: ‎06-21-2004
Message 4 of 4 (285 Views)

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

03-14-2013 11:37 AM in reply to: vze26m98

Glad I could be of no help whatsoever. :smileyhappy:

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



(defun botsbuildbots() (botsbuildbots))
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.