Author Topic: AutoCAD and Visual Studio Dot Net  (Read 5622 times)

0 Members and 1 Guest are viewing this topic.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
AutoCAD and Visual Studio Dot Net
« on: March 11, 2010, 12:27:58 PM »
I don't know why but I cannot find the official Autodesk listing identifying what versions of Visual Studio Dot Net are applicable to a given version of AutoCAD, i.e.

AutoCAD Version    Visual Studio Version(s)
2004??
2006??
2008??
2010??

Odd numbered versions skipped deliberately.

Thanks for any help.
« Last Edit: March 11, 2010, 12:32:05 PM by MP »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

pkohut

  • Guest
Re: AutoCAD and Visual Studio Dot Net
« Reply #1 on: March 11, 2010, 12:58:09 PM »
Odd numbered versions skipped deliberately.

Why? Was there something odd about them?  :roll: (I need sleep)

Sorry can't help with the original question.

sinc

  • Guest
Re: AutoCAD and Visual Studio Dot Net
« Reply #2 on: March 11, 2010, 02:34:04 PM »
I think all of those targeted the .NET 2.0 framework except for 2010, which targets the .NET 3.5 framework, and maybe 2004, which I don't think had a .NET interface...?  However, you should be able to target .NET 3.5 for all of them, although you may need to make sure that .NET 3.5 is installed on your target machines.  This generally isn't a problem, though, as pretty much everyone has .NET 3.5 SP1 installed these days.

Glenn R

  • Guest
Re: AutoCAD and Visual Studio Dot Net
« Reply #3 on: March 11, 2010, 03:28:51 PM »
More to the point, I think all of the new features will run on .NET 2.0 CLR. The new features are mainly syntax/compiler, which are compiled to run (ie are changed to general methods etc. by the compiler) on the .NET 2.0 CLR...compiler magic - look in the IL for lambda's or extension methods and they are compiled as general static methods for instance, which are compatible with 2.0 CLR.

I believe this will be different for .NET 4.0, as they are possibly releasing a new version of the CLR (dynamics), but I am not 100% certain of this factoid.

2005 was the first instance with a .NET implementation if memory serves, but it was changed significantly with 2006.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: AutoCAD and Visual Studio Dot Net
« Reply #4 on: March 11, 2010, 03:36:44 PM »
<scratches head>

Are ya'll saying you can specify what .NET run time a given version of Visual Studio uses? i.e. Visual Studio 2008 can use the 2.0 CLR? If so, "I did not know that", if not "I am totally confused nao".

In the end I just need to know what version of Visual Studio [and .NET runtime(s)] I need to spec to our IT guys for a computer that will have AutoCAD 2008 installed. Sorry to be so daft. Thanks.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Glenn R

  • Guest
Re: AutoCAD and Visual Studio Dot Net
« Reply #5 on: March 11, 2010, 03:42:04 PM »
yes, with Vis Stud '08, you can specify which framework to target. As far as Acad 2008 goes, I would use VS08 and get them to install the latest framework, 3.5, which still uses CLR 2.0.

Glenn R

  • Guest
Re: AutoCAD and Visual Studio Dot Net
« Reply #6 on: March 11, 2010, 03:43:37 PM »
It sounds like you're confusing the framework version with the CLR version.

The current framework version is 3.5 SP1 AFAIK, which still uses CLR 2.0.

Glenn R

  • Guest
Re: AutoCAD and Visual Studio Dot Net
« Reply #7 on: March 11, 2010, 03:46:10 PM »
Having said the above, if you go have a look at the acad.exe.config, from memory, it targets the latest framework by default, but a comment in the xml suggests that if you're having problems, uncomment the specific framework target line, which is 2.x

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: AutoCAD and Visual Studio Dot Net
« Reply #8 on: March 11, 2010, 03:56:54 PM »
yes, with Vis Stud '08, you can specify which framework to target. As far as Acad 2008 goes, I would use VS08 and get them to install the latest framework, 3.5, which still uses CLR 2.0.

Perfect, thank you Glenn -- and everyone who tried to help me understand!!
« Last Edit: March 11, 2010, 04:05:18 PM by MP »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Glenn R

  • Guest
Re: AutoCAD and Visual Studio Dot Net
« Reply #9 on: March 11, 2010, 04:09:22 PM »
< slap > ;-)

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8735
  • AKA Daniel
Re: AutoCAD and Visual Studio Dot Net
« Reply #10 on: March 11, 2010, 06:19:41 PM »
AutoCAD 2004 did not have .net, IMHO the implementation stabilized in 2007. As Glenn said .NET 2.0 -3.5 use the same runtime CLR2.0. VS2010 / .NET 4.0  use a new runtime CLR4.0, at this point (RC1) is not compatible AutoCAD.

With Visual Studio 2008 and 2010, you can target earlier versions of .NET. IMO, use the latest and greatest version of Visual Studio and set the target framework as needed.
« Last Edit: March 11, 2010, 06:23:18 PM by Daniel »

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8735
  • AKA Daniel
Re: AutoCAD and Visual Studio Dot Net
« Reply #11 on: March 11, 2010, 06:36:18 PM »
If .NET 4 is not compatible with AutoCAD in the RTM && Autodesk sticks to its three year binary compatibility schedule, this means we will not be able to use VS2010 until 2013, after that .NET programmers will need to start versioning their modules.

Our pretty little linq statements will need to be wrapped ..

#ifdef CLR_2.0257
...
#endif

#ifdef CLR_4.0345
..
#endif


 :-o

sinc

  • Guest
Re: AutoCAD and Visual Studio Dot Net
« Reply #12 on: March 12, 2010, 11:29:08 AM »
I had heard something about some unreleased DLLs that appear to fix this problem, so I think it's expected to go away.  But don't hold me to that statement.    :-)

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8735
  • AKA Daniel
Re: AutoCAD and Visual Studio Dot Net
« Reply #13 on: March 12, 2010, 07:51:40 PM »
That would be great! .NET 4 seems to just work fine on 2007. If they can fix this for all the affected versions, that sure would make life easier.

csharpbird

  • Newt
  • Posts: 64
Re: AutoCAD and Visual Studio Dot Net
« Reply #14 on: March 15, 2010, 10:16:49 AM »
That would be great! .NET 4 seems to just work fine on 2007. If they can fix this for all the affected versions, that sure would make life easier.
Do you mean that .NET 4.0 is compatible with ACAD 2007?

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8735
  • AKA Daniel
Re: AutoCAD and Visual Studio Dot Net
« Reply #15 on: March 15, 2010, 10:38:16 AM »
It worked with my quick test. I add this to the config

  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>

It seems the incompatibility is in WPF, which its probably why it fails with later versions