Author Topic: Cannot netload dll from C# 4.0  (Read 5412 times)

0 Members and 1 Guest are viewing this topic.

csharpbird

  • Newt
  • Posts: 64
Cannot netload dll from C# 4.0
« on: October 22, 2009, 02:41:53 AM »
It seems that we cannot use the latest visual studio 2010 in AutoCAD.
When I netload the dll compiled by Visual studio 2010,I get the following error message:System.BadImageFormatException.

Glenn R

  • Guest
Re: Cannot netload dll from C# 4.0
« Reply #1 on: October 22, 2009, 05:08:37 AM »
Is your 2010's config set to use a specific framework version?

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8766
  • AKA Daniel
Re: Cannot netload dll from C# 4.0
« Reply #2 on: October 22, 2009, 06:53:27 AM »
 yep, looks like it's broke.  :-(

csharpbird

  • Newt
  • Posts: 64
Re: Cannot netload dll from C# 4.0
« Reply #3 on: October 22, 2009, 06:55:41 AM »
When I load a DLL using "NetLoad" command, 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.

csharpbird

  • Newt
  • Posts: 64
Re: Cannot netload dll from C# 4.0
« Reply #4 on: October 22, 2009, 08:58:27 AM »
But AU 2009 will have the class "Using .NET 4.0 with AutoCADŽ".(http://au.autodesk.com/?nd=e_class&session_id=5164)

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.


It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8766
  • AKA Daniel
Re: Cannot netload dll from C# 4.0
« Reply #5 on: October 22, 2009, 10:38:54 AM »
When I load a DLL using "NetLoad" command, 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.

Same here, with VS2010 beta 1, I was able to goof with the acad.exe.config file to get the modules to load, not so with beta 2.

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: Cannot netload dll from C# 4.0
« Reply #6 on: October 23, 2009, 02:15:31 PM »
But AU 2009 will have the class "Using .NET 4.0 with AutoCADŽ".(http://au.autodesk.com/?nd=e_class&session_id=5164)

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.
I'm noticed that session. Since I get to go this year I signed up for it. Stay tuned.
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

sinc

  • Guest
Re: Cannot netload dll from C# 4.0
« Reply #7 on: October 24, 2009, 11:15:09 AM »
Unless that class gets pulled because the instructor discovers nothing works with VS 2010 Beta 2...   :lol: