I've built applications using FME Objects in previous versions of Visual Studio, first back in VB6 then in VB.NET in VS 2005. I'm now trying to use FME Objects again in C# within VS 2012 and am getting stuck. Stuck at the very beginnging.
If I try to include this in a class library I get an FMEOException when it tries to create a session. The operative part of the code is below.
IFMEOSession m_pFMESession = null;
System.Collections.Specialized.StringCollection pSettings = new System.Collections.Specialized.StringCollection();
pSettings.Add("FME_DEBUG");
pSettings.Add("BADNEWS");
pSettings.Add("FME_USE_RICH_GEOMETRY");
pSettings.Add("yes");
m_pFMESession = FMEObject.CreateSession(); // Fails here
I've been told that FME Objects was built with an older version of the .NET library so I need to include an App.Config to reference the old runtime. My App.Config looks like this:
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v2.0.50727"/></startup>
</configuration>
Still no luck though. Is anyone using FME Objects in VS 2012? Any information on how you've got it to work would be much appreciated.
Thanks,
Ed