I have some dll that is written in .Net
framework 4.0
and I can't run my program when I'm referencing it to my project which is written in .NET core 2.0
.
Although my IDE (vs 2017) can recognize the objects imported from that dll correctly in run time Im having the following exception:
System.BadImageFormatException: 'Could not load file or assembly 'A_dotnet_4.0_A, Version=10.0.0.0, Culture=neutral, PublicKeyToken=0ad20d08c672086a'. An attempt was made to load a program with an incorrect format.'
I tried to:
- change my settings to any CPU as I saw in a post here
- tried to clean-rebuild my project.
Is it even possible? and if it does, how should I do so. In the following link is seem like it is possible - I just can't understand how.