Jump to content

Error message when loading the sample file


ahyin

Recommended Posts

Dear Sir,

 

I'm new in vb.net, I try to load the sample file from AutoCAD .net training and got the following error message, anything in my AutoCAD setting.

Thanks !

 

 

Cannot load assembly. Error details: System.BadImageFormatException: Could

not

load file or assembly 'file:///C:\Documents and Settings\CAD\desktop\AutoCAD .NET

Training\Labs_Complete\vbNET\Lab1_Complete\bin\Release\Lab1_Complete_2010.dll'

or one of its dependencies. This assembly is built by a runtime newer than the

currently loaded runtime and cannot be loaded.

File name: 'file:///C:\Documents and Settings\CAD\desktop\AutoCAD .NET

Training\Labs_Complete\vbNET\Lab1_Complete\bin\Release\Lab1_Complete_2010.dll'

at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,

Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,

Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,

Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,

Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,

Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence

securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm,

Boolean forIntrospection, StackCrawlMark& stackMark)

at System.Reflection.Assembly.LoadFrom(String assemblyFile)

at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)

at loadmgd()

Warning: The switch assembly binding logging OFF。

To record the assembly binding failures, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)set as 1。

Note: failure to bind with the components of records related to the performance will be part of the negative impact

To turn this feature off, remove the registry value[HKLM\Software\Microsoft\Fusion!EnableLog]

Link to comment
Share on other sites

It may be a .NET Framework version issue.

 

For instance, if the VB.NET project targeted .NET framework 3.5, for AutoCAD 2010 or 2011, it would fail to load into AutoCAD 2007, which requires Framework 2.0.

Link to comment
Share on other sites

It may be a .NET Framework version issue.

 

For instance, if the VB.NET project targeted .NET framework 3.5, for AutoCAD 2010 or 2011, it would fail to load into AutoCAD 2007, which requires Framework 2.0.

Thanks for reply , I'm using AutoCAD 2011 and .NET framework 4.0.

Link to comment
Share on other sites

A Visual Studio project for AutoCAD 2011 should target .NET Framework 3.5, if I recall correctly.

 

Thanks ! I will download .NET Framework 3.5 to try.

Link to comment
Share on other sites

Thanks ! I will download .NET Framework 3.5 to try.

 

 

If you are using Architecture 2011 then you already have .NET Framework 3.5 installed.

 

 

 

What may need to be done is to confirm that the Visual Studio project containing that training file has 3.5 set as the target framework. See Image.

Framework.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...