Unhandled Exception Occurs

I downloaded the latest source code from GitHub - groupdocs-viewer/GroupDocs.Viewer-for-.NET: GroupDocs.Viewer for .NET examples, plugins and showcase. I followed the steps to “How to run examples” but when I ran the solution an unhandled exception pop up which says “An unhandled exception of type ‘System.BadImageFormatException’ occurred in Unknown Module. Additional information: Could not load file or assembly ‘GroupDocs.Viewer.Examples.CSharp.exe’ or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.”. I’m unable to find the solution to this exception. Any help in this regard is much appreciated.

Thanks in Anticipation!

Regards
Farwa Batool

Hi Farwa,


Thanks for taking interest in GroupDocs.Viewer for .NET.

Can you please provide us the following details:

  • OS you are using
  • Line of code on which you get this exception
  • The problematic file

We shall be looking forward to your response.

Warm Regards

Thanks for your response!


Here are the details:
OS: Windows 7 Professional 64 bit operating system.
Line of code: Unfortunately, it doesn’t mention the line of code which is causing the problem.
Problematic File: As above, doesn’t indicate.

Note: I have read about the exception, it says there is compatibility issues with dlls used.

Regards

Hi Farwa,


Thanks for providing the details.

Are you able to build the application successfully? If yes, can you please debug the application by applying the breakpoints? This will help you in locating the point where the exception is occurring. We shall be looking forward to your response.

Warm Regards

Yes I was able to build the project successfully. I put a lot of break points to track the point of exception but it didn’t even go to any them. It throws the exception at the very initial stage of execution may be at the time of linking through dlls.


Regards

Hi Farwa,


Thanks for your response.

Please try to change the framework of the project to .NET 4.0 Client Profile or .NET 4.5 and check if the issue is resolved. We shall be looking forward to your response.

Warm Regards