If you run into trouble when trying to run your .NET programs with AutoCAD, it may be because AutoCAD does not use the correct version of the Framework. If so, follow the instruction in the following config file located in C:\Program Files\AutoCAD 2009\acad.exe.config

<configuration> <startup><!--We always use the latest version of the framework installed on the computer. If youare having problems then explicitly specify .NET 2.0 by uncommenting the following line.<supportedRuntime version="v2.0.50727"/>--> </startup><!--All assemblies in AutoCAD are fully trusted so there's no point generating publisher evidence--> <runtime> <generatePublisherEvidence enabled="false"/> </runtime></configuration>