Rodl2code.exe version (10.0.0.1609) create uncompiled .net intf client from RODL

Hi, we have updated from 10.0.0.1589 to 10.0.0.1609 and can not use code created by rodl2code.exe
I can’t find any similar problems. I want to understand if we are doing something wrong or if it’s a rodl2code.exe problem and everyone has a similar problem.

our intf.cs code generation options:
rodl2code.exe --type:intf --platform:.net --language:c#

We get code with a lot of object!, for example:

public class TRDAddress_Activator : object, RemObjects.SDK.ITypeActivator
{
  public TRDAddress_Activator()
  {
  }

  public object! CreateInstance()
  {
    return new TRDAddress();
  }
}

And the following errors on the build project:

  1. ‘TRDAddress_Activator’ does not implement interface member ‘ITypeActivator.CreateInstance()’
  2. Invalid token ‘!’ in class, record, struct, or interface member declaration
  3. Method must have a return type

Hi,

what IDE are you using?

VS complains nothing about it:


EDIT: use --codedom option like

rodl2code.exe --type:intf --platform:.net --language:c# --codedom

–codedom is help!

thank you very much, in version 10.0.0.1589 there was no codedom option.
maybe you can explain in simple words what is generated now without this option? I couldn’t find anything related to rodl2code.exe and codedom

Hi,

We have switched to CG4 based codegen for C#, Oxygene, Swift and Visual Basic languages.

Old .NET codegen was CodeDom based and it is kept for backward compatibility. it can be accessible with –codedom key.

You didn’t answer to my q: what IDE are you using and what compiler complains about ! token ?

Microsoft Visual Studio Enterprise 2017 15.8.6
Microsoft Visual Studio Enterprise 2022 (64-bit) 17.13.6
Microsoft (R) Visual C# Compiler version 4.13.0-3.25167.3 (73eff2b5)

Hi,

for generation of Microsoft C# compatible files, use --language:standard-csharp option.

--language:c# option generates RemObjects C# compatible files.

I’ll update rodl2code prompt

1 Like

Hi,

thank you, will investigate later new cs file generated with --language:standard-csharp
Note: object! was not generated

Hello,

I have this same problem. I am not using rodl2code.exe but Service Builder. I select the option “CodeGen, C# for .NET” and the generated files include the ITypeActivator referencias and object!in the CreateInstance() declaration. Both produce this kind of errors in VisualStudio (Professional 2022, Version 17.13.6):

CS0535 'TAgenciaTS4_Activator' does not implement interface member  'ITypeActivator.CreateInstance()'
CS1519 Invalid token '!' in class, record, struct, or interface member declaration
CS1520 Method must have a return type

The only way to workaround this is to use the old codegen option. I am also on 1609.

My app is targeting .NET 8.0.

Hi,

fixed.
Service Builder will use standard C# in .1613

1 Like