The .NET interop type cannot be used in code for the Classic

Tarek_DemiatiTarek_Demiati Member Posts: 112
edited 2011-12-13 in NAV Three Tier
I've create a variable in NAV as DotNet, pointing to a .NET assembly in NAV2009R2

When I run this single line of code I end up with the error bellow

Questions : - What .NET interop type are not supported in the Classic CSide runtime
- Where can I view the type of this .NET interop (sorry guys I'm not familiar with Visual Studio yet!)
- Is there a way to get the Classic CSide client support any type ? via CASTing or something else ...

IEngineLoader.GetEngineObject('DEMO', '0', '0');

Microsoft Dynamics NAV Classic
The .NET interop type cannot be used in code for the Classic CSide runtime.

OK

Comments

  • WaldoWaldo Member Posts: 3,412
    It's simple .. the "datatype" DotNet cannot run under the classic client. You're trying a "RUN" of a codeunit or whatever? it's just not possible. You have to make sure you're running under the RTC before you're able to run your code with that DotNet-variable.. .

    - What .NET interop type are not supported in the Classic CSide runtime
    None.
    - Where can I view the type of this .NET interop (sorry guys I'm not familiar with Visual Studio yet!)
    Nowhere :-).
    - Is there a way to get the Classic CSide client support any type ? via CASTing or something else ...
    Nope.

    hm .. quite a negative answer ;-).

    keep in mind that NAV7 isn't going to support the classic runtime anymore .. so supporting .Net INterop in classic doesn't make sense in the long run...

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
Sign In or Register to comment.