built 2015 C3DReports DLL netload System.BadImageFormatException

built 2015 C3DReports DLL netload System.BadImageFormatException

Anonymous
Not applicable
1,562 Views
3 Replies
Message 1 of 4

built 2015 C3DReports DLL netload System.BadImageFormatException

Anonymous
Not applicable

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

 

 

 

 

 

 

0 Likes
Accepted solutions (1)
1,563 Views
3 Replies
Replies (3)
Message 2 of 4

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

augusto.goncalves
Alumni
Alumni
Accepted solution

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
0 Likes
Message 4 of 4

Anonymous
Not applicable

*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*

 

 

0 Likes