Skip to main content

What limits are there on backwards/forwards compatibility when using FME Objects .NET? I ask because I have a custom .NET application that was built using FMEObjectsDotNet4.dll (build 18567) that fails when used with FME Desktop 2022 (build 22337). This is the exception message:

 

System.IO.FileLoadException: A procedure imported by 'FMEObjectsDotNet4.dll' could not be loaded.

 

There were no issues on install (FME Data Inspector 2022 works as expected), and the Path environment variable appears to be set correctly. The custom .NET application worked properly with FME Desktop 2019.1.1 (build 19617).

Hi @erwhite1​, there have been changes to modernize the FME SDK as of the FME 2022.0 release. Here a couple of resource to help you migrate to the latest FME SDK:


@erwhite1​, I'm sorry, I've been talking to our team about this some more, and the resources that I provided in my previous comment may not be applicable to .NET. However, my colleague is taking a closer look at this and do some testing. I'll follow-up as soon as we have additional information to share. Thanks.


After some investigation by our team, we can confirm that the .NET API backwards compatibility did indeed get affected by the FME Objects 1.1 change we made for FME 2022.0.

 

To fix to your issue, rebuild your original .NET project with referencing the FMEObjectsDotNet4.dll included with FME 2022.0 to produce a new .exe. There shouldn't be a need to do additional changes the original .NET project.

 

I hope this helps!


Got it. Thanks for the quick response.


Hi. I'm having the same trouble. Didn't help rebuild your original .NET project with referencing the FMEObjectsDotNet4.dll included. Do you have any ideas, please?


I'm attaching a test project ...


@nampreetatsafe​ please, There are any updates?


@nampreetatsafe​ please, There are any updates?

Sorry @pavelsvoboda​ for not noticing your earlier posts. I'm going to see if we have someone from our team help you out. This is out of my wheelhouse. Thanks for your patience.


@nampreetatsafe​ please, There are any updates?

Hi @pavelsvoboda​, Our team looked at the provided package and made the observations listed below. After you built TestRunFmeDesktop.exe using FMEObjectsDotNet4.dll from FME 2022, did you try running it on FME 2022 or another version? 

 

From our findings, your TestRunFmeDesktop.exe should successfully run on FME 2022+, it will not run on FME 2021.x and earlier:

  • The .NET project is referencing the FMEObjectsDotNet4.dll from an FME 2022 b22337 and the project was already successfully built into an executable TestRunFmeDesktop.exe
  • We tried running the built TestRunFmeDesktop.exe on an FME 2022 b22347 and it successfully runs. (the application fails later on, but FME Objects was loaded successfully)
  • We tried running your TestRunFmeDesktop.exe on an older FME 2021.2 b21801 and it fails with the exception Unhandled Exception: System.IO.FileLoadException: A procedure imported by 'FMEObjectsDotNet4.dll' could not be loaded. as described by the original question above.

 

My colleague was also going to suggest leveraging IFMEWorkspaceRunner, which is a better way to go than using .NET to do low-level reading and writing via FME Objects. However, it looks like you are already creating an IFMEOWorkspaceRunner in your project for running a workspace, so you are already on your way there.


Hi @pavelsvoboda​, Our team looked at the provided package and made the observations listed below. After you built TestRunFmeDesktop.exe using FMEObjectsDotNet4.dll from FME 2022, did you try running it on FME 2022 or another version? 

 

From our findings, your TestRunFmeDesktop.exe should successfully run on FME 2022+, it will not run on FME 2021.x and earlier:

  • The .NET project is referencing the FMEObjectsDotNet4.dll from an FME 2022 b22337 and the project was already successfully built into an executable TestRunFmeDesktop.exe
  • We tried running the built TestRunFmeDesktop.exe on an FME 2022 b22347 and it successfully runs. (the application fails later on, but FME Objects was loaded successfully)
  • We tried running your TestRunFmeDesktop.exe on an older FME 2021.2 b21801 and it fails with the exception Unhandled Exception: System.IO.FileLoadException: A procedure imported by 'FMEObjectsDotNet4.dll' could not be loaded. as described by the original question above.

 

My colleague was also going to suggest leveraging IFMEWorkspaceRunner, which is a better way to go than using .NET to do low-level reading and writing via FME Objects. However, it looks like you are already creating an IFMEOWorkspaceRunner in your project for running a workspace, so you are already on your way there.

Hi @nampreetatsafe​ . It looks like FME 2022.x doesn't set the "Path" system variable during installation. Therefore "FMEObjectsDotNet4.dll" cannot load the reference (probably fme.exe). I added the system variable "<drive>:\\Program Files\\FME" and everything runs as it should. Thank you for your cooperation and have a nice day


Reply