Distinguished Contributor
Posts: 243
Registered: ‎04-15-2011
Message 1 of 3 (354 Views)

VS2010 & AutoCAD 2009 Netload problem

354 Views, 2 Replies
07-12-2012 04:00 AM


I have created a program with VS2010 with a target .NET4.0.

It works fine in later versions of AutoCAD but I’m trying to get it to work under 2009 (Windows 7).


I get an error when trying to NETLOAD the .dll saying :

Cannot load assembly. Error details: System.BadImageFormatException:


This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.



I’ve tried adding v4.0 to acad.exe.config as suggested but then I get a fatal error when AutoCAD loads.


  <startup useLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntime version="v4.0"/>


<!--All assemblies in AutoCAD are fully trusted so there's no point generating publisher evidence-->


        <generatePublisherEvidence enabled="false"/>   



Active Member
Posts: 7
Registered: ‎03-13-2012
Message 2 of 3 (349 Views)

Re: VS2010 & AutoCAD 2009 Netload problem

07-12-2012 04:52 AM in reply to: SRSDS

AutoCAD 2009 uses framework 3.0, so you need to target Framework 3 instead of framework 4.



Distinguished Contributor
Posts: 149
Registered: ‎09-15-2011
Message 3 of 3 (298 Views)

Re: VS2010 & AutoCAD 2009 Netload problem

08-03-2012 07:24 PM in reply to: SRSDS

On AutoCAD installation folder, look for acad.exe.config, enable supportedRuntime to allow Visual Studio 2010 debugging .NET framework 2.0 and 3.5 on AutoCAD. VS2010 by default uses .NET framework 4.0 to debug.


<supportedRuntime version=”v2.0.50727″/>



On Visual Studio 2010, go to Project Properties (right-click on project name and select Properties), then select Application tab, select Target framework 3.0 for AutoCAD 2009 or 3.5 for AutoCAD 2011.



You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community