.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Frustrated VB user moving to .Net looking for a bit of help!

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
274 Views, 3 Replies

Frustrated VB user moving to .Net looking for a bit of help!

Ok, I've been trying to get a couple of the labs posted here working on my
machine with ACAD2006 and VB.Net 2005 Express Beta 2. I notices something
about the acad.exe.config file in an earlier post but I couldn't figure out
if I had to change something there for VS 2005.

The dll compiles fine but when I try to load the file with NETLOAD I get the
following error in AutoCAD, any Ideas what I'm missing?:

Command: NETLOAD
Cannot load assembly. Error details: System.BadImageFormatException: The
format
of the file 'Lab1.dll' is invalid.
File name: "Lab1.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound,
Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Documents and Settings\jim\My
Documents\Visual Studio 2005\Projects\Lab1\Lab1\bin\Release\Lab1.dll
LOG: Appbase = C:\Program Files\Autodesk\Acade 2006\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Documents and Settings/jim/My
Documents/Visual Studio 2005/Projects/Lab1/Lab1/bin/Release/Lab1.dll.
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

Apperently you did change acad.exe.config. The error indicates that you are
trying to load an assembly compiled for .NET 2.0 while running AutoCAD on
the .NET 1.1 framework. If you want to load .NET 2.0 assemblies then you
must allow AutoCAD to load the .NET 2.0 framework. You can do this by either
not having an acad.exe.config file or using the original.

albert

"Jim Dowthwaite" wrote in message
news:4965990@discussion.autodesk.com...
Ok, I've been trying to get a couple of the labs posted here working on my
machine with ACAD2006 and VB.Net 2005 Express Beta 2. I notices something
about the acad.exe.config file in an earlier post but I couldn't figure out
if I had to change something there for VS 2005.

The dll compiles fine but when I try to load the file with NETLOAD I get the
following error in AutoCAD, any Ideas what I'm missing?:

Command: NETLOAD
Cannot load assembly. Error details: System.BadImageFormatException: The
format
of the file 'Lab1.dll' is invalid.
File name: "Lab1.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound,
Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Documents and Settings\jim\My
Documents\Visual Studio 2005\Projects\Lab1\Lab1\bin\Release\Lab1.dll
LOG: Appbase = C:\Program Files\Autodesk\Acade 2006\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Documents and Settings/jim/My
Documents/Visual Studio 2005/Projects/Lab1/Lab1/bin/Release/Lab1.dll.
Message 3 of 4
Anonymous
in reply to: Anonymous

Albert,

Not sure when the original disappeared...is there any chance you could tell
me what has changed in the acad.exe.config file (or post an 'original'
here)?

Jim.

"Albert Szilvasy" wrote in message
news:4966198@discussion.autodesk.com...
Apperently you did change acad.exe.config. The error indicates that you are
trying to load an assembly compiled for .NET 2.0 while running AutoCAD on
the .NET 1.1 framework. If you want to load .NET 2.0 assemblies then you
must allow AutoCAD to load the .NET 2.0 framework. You can do this by either
not having an acad.exe.config file or using the original.

albert

"Jim Dowthwaite" wrote in message
news:4965990@discussion.autodesk.com...
Ok, I've been trying to get a couple of the labs posted here working on my
machine with ACAD2006 and VB.Net 2005 Express Beta 2. I notices something
about the acad.exe.config file in an earlier post but I couldn't figure out
if I had to change something there for VS 2005.

The dll compiles fine but when I try to load the file with NETLOAD I get the
following error in AutoCAD, any Ideas what I'm missing?:

Command: NETLOAD
Cannot load assembly. Error details: System.BadImageFormatException: The
format
of the file 'Lab1.dll' is invalid.
File name: "Lab1.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound,
Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Documents and Settings\jim\My
Documents\Visual Studio 2005\Projects\Lab1\Lab1\bin\Release\Lab1.dll
LOG: Appbase = C:\Program Files\Autodesk\Acade 2006\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Documents and Settings/jim/My
Documents/Visual Studio 2005/Projects/Lab1/Lab1/bin/Release/Lab1.dll.
Message 4 of 4
Anonymous
in reply to: Anonymous

The original is on your AutoCAD CD.

aLbert
"Jim Dowthwaite" wrote in message
news:4966238@discussion.autodesk.com...
Albert,

Not sure when the original disappeared...is there any chance you could tell
me what has changed in the acad.exe.config file (or post an 'original'
here)?

Jim.

"Albert Szilvasy" wrote in message
news:4966198@discussion.autodesk.com...
Apperently you did change acad.exe.config. The error indicates that you are
trying to load an assembly compiled for .NET 2.0 while running AutoCAD on
the .NET 1.1 framework. If you want to load .NET 2.0 assemblies then you
must allow AutoCAD to load the .NET 2.0 framework. You can do this by either
not having an acad.exe.config file or using the original.

albert

"Jim Dowthwaite" wrote in message
news:4965990@discussion.autodesk.com...
Ok, I've been trying to get a couple of the labs posted here working on my
machine with ACAD2006 and VB.Net 2005 Express Beta 2. I notices something
about the acad.exe.config file in an earlier post but I couldn't figure out
if I had to change something there for VS 2005.

The dll compiles fine but when I try to load the file with NETLOAD I get the
following error in AutoCAD, any Ideas what I'm missing?:

Command: NETLOAD
Cannot load assembly. Error details: System.BadImageFormatException: The
format
of the file 'Lab1.dll' is invalid.
File name: "Lab1.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound,
Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Documents and Settings\jim\My
Documents\Visual Studio 2005\Projects\Lab1\Lab1\bin\Release\Lab1.dll
LOG: Appbase = C:\Program Files\Autodesk\Acade 2006\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Documents and Settings/jim/My
Documents/Visual Studio 2005/Projects/Lab1/Lab1/bin/Release/Lab1.dll.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost