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

commandmethod

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
1118 Views, 4 Replies

commandmethod

How come I only get "Autodesk.AutoCAD.Runtime.CommandMethodAttribute"
instead of getting "Autodesk.AutoCAD.Runtime.CommandMethod"
I canĀ“t find CommandMethod

I'm using ACAD2006 and NetFramework 2.0

--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

BTW, this started to happen after I upgraded the framework from 1.1 to 2.0

--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica


"Jorge Jimenez" wrote in message
news:5005301@discussion.autodesk.com...
How come I only get "Autodesk.AutoCAD.Runtime.CommandMethodAttribute"
instead of getting "Autodesk.AutoCAD.Runtime.CommandMethod"
I canĀ“t find CommandMethod

I'm using ACAD2006 and NetFramework 2.0

--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica
Message 3 of 5
smcclure
in reply to: Anonymous

CommandMethodAttribute and CommandMethod are one and the same. .NET naming standards dictate that attributes have "Attribute" at the end of the name. While this is not required, if the attribute type name ends in "Attribute", the compiler will allow you to type the attribute name without the "Attribute" at the end. For example, I could do either when defining an attribute in VB .NET or
Message 4 of 5
Jedimaster
in reply to: Anonymous

It is the Application target framework  .net version is the reason why you see one and not the other Autodesk.AutoCAD.Runtime.CommandMethod seems to only be in 4.5 or higher otherwise you see only Autodesk.AutoCAD.Runtime.CommandMethodAttribue. I could be wrong about this have been racking myself silly for four days to realize why I Kept  getting Error  Type 'Autodesk.AutoCAD.Runtime.CommandMethod' is not defined. My default is set to 4.0

Message 5 of 5

CommandMethod and CommandMethodAttribute are one and the same.

 

The compiler allows attributes whose names end with 'Attribute' to be abbreviated to exclude the Attribute.

 

If you're getting that error, it's most-likely because your target framework is not the same as the framework of the managed assemblies that you're referencing.

 


@Jedimaster wrote:

It is the Application target framework  .net version is the reason why you see one and not the other Autodesk.AutoCAD.Runtime.CommandMethod seems to only be in 4.5 or higher otherwise you see only Autodesk.AutoCAD.Runtime.CommandMethodAttribue. I could be wrong about this have been racking myself silly for four days to realize why I Kept  getting Error  Type 'Autodesk.AutoCAD.Runtime.CommandMethod' is not defined. My default is set to 4.0




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