Learn. Connect. Share.December 1-3 | The Mandalay Bay Hotel, Las Vegas

Using .NET 4.0 with AutoCADĀ®

4 Questions 11 Answers Ask the Speaker a Question
  • Class ID: CP104-1
  • Class Information
  • Class Type: 90-Minute Class
  • Expertise: Advanced
  • Industry: All Industries
  • Primary Track: Customization and Programming
  • Primary Software: AutoCAD

Class Audience

Developers, CAD managers, and power users

Class Description

Learn how you can use new features of version 4.0 of the .NET framework to create customizations for AutoCAD even easier than before. See how the Dynamic Language Runtime (DLR) and Languge Integrated Query (LINQ) enables experimentation and productivity without sacrificing (too much) performance.

Key Learning

  • Use scripting to experiment and prototype solutions
  • Create a user interface that blends with AutoCAD
  • Integrate your customization with the rest of your business via web services
  • Create customizable workflows
  • Provide deep integration with AutoCAD using the latest APIs

View all 4 questions Questions & Answers

  • Reply Kelcyo Pereira asked...
    Hello Albert, I have used your procedure to develop my assembles in Net 4 and deburgado normally. But when attempting to use outside of deburg or distribute to others who have Net 4 and configured the acad. exe.config also receive the error message "FATAL error: Unsupported version of Windows Presentation Foundation. What is the solution to use these assemblies ready? Grateful. 11-13-2009 9:33AM

  • Reply Albert Szilvasy replied...
    There's no solution on your end. AutoCAD will need to be service packed to fix this problem. albert 11-13-2009 9:37AM

  • Reply z ferry asked...
    If ,AutoCAD 2008 cannot run. If I delete useLegacyV2RuntimeActivationPolicy="true",AutoCAD 2008 can run but the .NET 4.0 DLL cannot loaded. 10-22-2009 8:21PM

  • Reply Albert Szilvasy replied...
    If you delete useLegacyV2RuntimeActivationPolicy="true" then you will be loading the 2.0 runtime so your dll compiled against the 4.0 runtime won't load. If AutoCAD 2008 does not start with the config file than it means it is incompatible with .NET 4.0 Beta 2. Albert 10-22-2009 8:29PM

  • Reply z ferry asked...
    What to add to acad.exe.config? Will previous version of AutoCAD(not 2010) start on .NET 4.0 Beta 2? 10-22-2009 6:27PM

  • Reply z ferry asked...
    I cannot run the dll which compiled by Visual Studio 2010 beta2. When I netload the dll into AutoCAD , I get the following error message: Cannot load assembly. Error details: System.BadImageFormatException: Could not load file or assembly 'file:///E:\Users\Administrator\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. 10-22-2009 8:15AM

  • Reply Albert Szilvasy replied...
    .NET 4.0, unlike previous version of the .NET framework, no longer rolls applications forward. AutoCAD will load and use the .NET 3.5 SP1 even when you have .NET 4.0 installed. This means that assemblies (.dlls) that you build against .NET 4.0 will not load. You can instruct AutoCAD to load the .NET 4.0 framework by adding the following to you acad.exe.config: Note however that AutoCAD 2010 will not start on .NET 4.0 Beta 2. There are some compatibility issues that we are working on. Albert 10-22-2009 11:06AM

  • Delete Reply z ferry replied...
    What to add to acad.exe.config? Will previous version of AutoCAD(not 2010) start on .NET 4.0 Beta 2? 10-22-2009 6:31PM

  • Reply Albert Szilvasy replied...
    This how you config file should look like: ----------- --------------- 10-22-2009 6:46PM

  • Delete Reply Albert Szilvasy replied...
    Ok. It looks like the online system does not like xml. See attachment.
    Attachment: net.exe.config 10-22-2009 6:48PM

  • Delete Reply Albert Szilvasy replied...
    Regarding earlier versions of AutoCAD and .NET 4.0 Beta 2. I don't have any data on this. We haven't done any testing yet. 10-22-2009 6:50PM

  • Delete Reply z ferry replied...
    AutoCAD 2008 has the same problem if the config file is modified as your attachment. 10-22-2009 8:12PM

  • Reply z ferry replied...
    If ,AutoCAD 2008 cannot run. If I delete useLegacyV2RuntimeActivationPolicy="true",AutoCAD 2008 can run but the .NET 4.0 DLL cannot loaded. 10-22-2009 8:22PM

  • Reply z ferry replied...
    With ,AutoCAD 2008 cannot run. If I delete useLegacyV2RuntimeActivationPolicy="true",AutoCAD 2008 can run but the .NET 4.0 DLL cannot loaded. 10-22-2009 8:22PM

  • Reply Kelcyo Pereira replied...
    Hello Albert, I have used your procedure to develop my assembles in Net 4 and deburgado normally. But when attempting to use outside of deburg or distribute to others who have Net 4 and configured the acad. exe.config also receive the error message "FATAL error: Unsupported version of Windows Presentation Foundation. What is the solution to use these assemblies ready? Grateful.
    Attachment: error.jpg 11-13-2009 8:35AM