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
<!--We always use the latest version of the framework installed on the computer. If you
are having problems then explicitly specify .NET 2.0 by uncommenting the following line.
<!--All assemblies in AutoCAD are fully trusted so there's no point generating publisher evidence-->