Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

built 2015 C3DReports DLL netload System.BadImageFormatException

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
kbarnettza
1379 Views, 3 Replies

built 2015 C3DReports DLL netload System.BadImageFormatException

I am my own worst enemy.

But maybe I can be saved from uninstalll and reinstall, maybe.

 

Windows 8.1

I installed IDSP 2015

Then I installed C3D 2014

[Life happens sometimes and sequences get messed up]

 

Then I needed to edit the 2015 Net C3DReports.

Updated references, built, no errors, build successful.

 

In C3D 2015, NETLOAD built DLL results in:

System.BadImageFormatException

 

MSDN says:

A BadImageFormatException exception is thrown when the file image of a DLL or executable program is not valid.

Associated Tips
Make sure the file image is a valid managed assembly or module.
This exception is thrown when unmanaged code is passed to Load for loading.

Make sure you have supplied a correct file path for the assembly.
If using a relative path, verify that the current directory is correct.

 

Fusion Log is:

=== Pre-bind state information ===
LOG: Appbase = file:///C:/Program Files/Autodesk/Autodesk AutoCAD Civil 3D 2014/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: C:\Program Files\Autodesk\Autodesk AutoCAD Civil 3D 2014\acad.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

 

Aha!  that cant be right ... reference to 2014 got in there somehow.. !!??

Is this a setting in C3D 2015 or a setting in the Net C3DReports Project? Where? How? Help!   : (

 

Or ... maybe something else .. here is my list of references:

Thx for your patience...

badimage01.png

 

 

 

 

 

 

3 REPLIES 3
Message 2 of 4
Jeff_M
in reply to: kbarnettza

It looks like you are running the C3D2015 report from C3D2014
Jeff_M, also a frequent Swamper
EESignature
Message 3 of 4

This BadImageFormatException is most often related to build your application to 32 bit and then try load on 64 bit.

 

Please go to properties of the project and change to x64 platform

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 4 of 4

*blush*

oops  : (    ... that was it ... I was so used to VS not building when the platform was set incorrectly... oops... that was it ... build was set to 32 bit

I was about to delete this thread, but maybe some other "learner" may make the same error.

At least I dont need to uninstall and install again - *phew*

 

 

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report