Still System.BadImageFormatException even try all the methods in community, Can anyone helps?

Still System.BadImageFormatException even try all the methods in community, Can anyone helps?

GuangxinLiu
Participant Participant
593 Views
4 Replies
Message 1 of 5

Still System.BadImageFormatException even try all the methods in community, Can anyone helps?

GuangxinLiu
Participant
Participant

Navisworks Manage 2020, Visual Studio 2022, .NET Frameworks 4.7.2.

 

I have already tried all the solutions. Change .NET Frameworks from 4.6 -4.8; Change Platform from x64 to x86 and AnyCPU, it still can not work when i'm debugging. And it is what am i test in a clean demo project. Below is the only code in this project:   ('Autodesk.Navisworks.Automation, Version=17.0.1336.83, Culture=neutral, PublicKeyToken=d85e58fa5af9b484')

GuangxinLiu_2-1715676760387.png

GuangxinLiu_3-1715676773729.png

 

 

 

 

0 Likes
Accepted solutions (1)
594 Views
4 Replies
Replies (4)
Message 2 of 5

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @GuangxinLiu ,

 

Could you please send me a simple, small, non-confidential Visual Studio project to replicate the issue on my end?


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 5

GuangxinLiu
Participant
Participant

Yes, below is my simple test project, and it doesn't work. The reference which i used is copied to bin/Debug Folder. Thanks!

0 Likes
Message 4 of 5

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @GuangxinLiu ,

 

I recommend reviewing the samples available in the Navisworks SDK, located at "NET\examples\Controls."

Before proceeding further, I suggest running the samples found in the aforementioned directory and informing me of any encountered issues.

In the absence of any issues, I advise following the procedures outlined in the sample located at "NET\examples\Controls."

Navisworks SDK : https://aps.autodesk.com/developer/overview/navisworks


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 5 of 5

GuangxinLiu
Participant
Participant

Thanks a lot! I found that I forgot the most important things, set up the Entry Point. It's my faults, and Debug by x64 is necessary. It works finally.