# Rodl2code generates invalid delphi code for .NET server & delphi client

**URL:** https://talk.remobjects.com/t/rodl2code-generates-invalid-delphi-code-for-net-server-delphi-client/34138
**Category:** Remoting SDK
**Tags:** net, delphi
**Created:** [October 14, 2026, 9:49am UTC](https://talk.remobjects.com/t/rodl2code-generates-invalid-delphi-code-for-net-server-delphi-client/34138 "2026-10-14T09:49:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [October 14, 2026, 9:49am UTC](https://talk.remobjects.com/t/rodl2code-generates-invalid-delphi-code-for-net-server-delphi-client/34138/1 "2026-10-14T09:49:08Z")

</div>

The rodl2code tool (in my personal build 1628?) generates invalid delphi code again

 ![image](https://talk.remobjects.com/uploads/default/original/3X/1/4/147ec91a4a2022dbf5b2fd7416525e70da0ec88c.png)

I use commandline

“%RemObjectsTop%\RemObjects SDK (Common)\Bin”\rodl2code PharmacyCloudService.remoteRODL --type:intf --platform:delphi --language:delphi --outpath:. --out:PharmacyCloudService\_Intf.pas

FYI: Generated code also uses other define for generics but I guess that was a valid modification on your end

 ![image](https://talk.remobjects.com/uploads/default/original/3X/3/b/3b3d53a7c07c7912c4086ba9e12f527b7fb53557.png)

Can this also be fixed?

Note: There is also a small issue in the .NET code generation where the intf.cs file contains 2x

using RemObjects.DataAbstract.Server;

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [October 14, 2026, 10:09am UTC](https://talk.remobjects.com/t/rodl2code-generates-invalid-delphi-code-for-net-server-delphi-client/34138/3 "2026-10-14T10:09:05Z")

</div>

Hi,

your ROD/DAD version is still .1611 but codegand this is a reason.

workarounds:

- modify `uROTypes.pas` like

```auto
  TROArray = class {$IFDEF DELPHI2007UP}abstract{$ENDIF} (TROComplexType)
..
  public
    function ElementAttributes: TParamAttributes; virtual; //<<<<<<<<added
...
function TROArray.ElementAttributes: TParamAttributes; //<<<<<<<<added
begin
  Result := [];
end;

procedure TROArray.ReadComplex(ASerializer: TObject);
..
  {$ENDIF}
  if l_pa = [] then l_pa := ElementAttributes; //<<<<<<<<added
  if GetItemClass <> nil then begin

procedure TROArray.WriteComplex(ASerializer: TObject);
...
  {$ENDIF}
  if l_pa = [] then l_pa := ElementAttributes; //<<<<<<<<added
  if GetItemClass <> nil then begin

```

or

- disable generics. you can do this on unit level (`{$UNDEF ROUseGenerics}`) in `_Intf.pas` or add the same statement into `RemObjects_user.inc`.

* * *

> [@fvancrae](#):
>
> FYI: Generated code also uses other define for generics but I guess that was a valid modification on your end

this is valid

* * *

> [@fvancrae](#):
>
> Note: There is also a small issue in the .NET code generation where the intf.cs file contains 2x
> 
> using RemObjects.DataAbstract.Server;

will fix
