ROSDK .Net [8.2.89.1153] - Trouble with derived and/or abstract services

Creating derived services in the latest ROSDK.Net RTM is simply impossible.

The generated invoker / implementations aren’t working and there’s no way to fix them manually, because they’re overwritten each time you close the ServiceBuilder.

It’s simple to reproduce:

Case1:

1. create a new C# ROSDK Service project 
2. open the RODL and add a new Service "BaseService" 
3. edit the default Service "ROServerService" and define the "BaseService" as it's ancestor 
4. leave the service builder and try to build the project

Result:

  • many virtual / override mismatches
  • derived Servies is trying to call the protected constructor of the “BaseService”

Case2:

1. create a new C# ROSDK Service project 
2. open the RODL and make the existing "ROServerService" abstract 
3. add a new Service "DerivedService" and define the "ROServerService" as it's ancestor 
4. leave the service builder and try to build the project

Result:

  • many virtual / override mismatches
  • the constructors and activators ob the abstract “ROServerService” are still generated
  • derived Servies is trying to call the protected constructor of the ABSTRACT “BaseService”

Case3:

1. create a new C# ROSDK Service project 
2. open the RODL clean it up
3. delete all generated ROSDK files from the project
4. open the RODL and create a new BaseService and a new DerivedService in a single step (abstract or not doesn't matter)
5. leave the service builder and try to build the project

Result:
same problems as before.

Hello

Thank you for the detailed reproduction steps.
However these issues doesn’t reproduce for the March 2015 release (8.2.89.1153). Seems you’re using an early post-release Beta where we tested a new code generator changes.
So could you double-check a RO SDK version being used (f.e. it is shown in the title of the Service Builder)?

Also most of the issues doesn’t reproduce in the latest Beta published today (except for the activator for abstract services bug - this one is being fixed) - so you could update to this one.

Regards

Hi Anton,
my ServiceBuilder is showing 8.2.89.1153.

Anything else I should check?

Hmm, that is strange. Could you check which assembly versions are displayed by VS in the reference properties?

Could you also upload projects you mentioned in the 1s post to support@ ? Seems we need to investigate this further.

Also if possible send the contents of the “…\RemObjects Software\RemObjects SDK for .NET\Source\RemObjects.SDK\CodeGen” folder.

Thanks in advance

OK, I’ll prepare the example projects and send it to support@

All referended ROSDK Assemblies are version 8.2.89.1153, except RemObjects.SDK.ZeroConf is 8.3.90.1155.

Thank you for the testcase.

Can we go over them?

Could you point where exactly you noticed the virtual/override mismatches?
Derived classes always call their ancestor’s constructors in .NET. Given derived service is represented as derived class in the code its constructor will always call its ancestor constructor.

Same for cases 2 and 3, except for the activator class being generated for abstract service - this issue will be fixed today and we can provide you a beta build containing the fix, if needed.

Strange. I’ll try to find a reproduceable case later.
Yesterday I had overridden methods with a vitual modifier in the base service and a virtual modifier (instead override) in the derived service.

I tried the same using Beta 8.3.90.1159,

  • created a new c# ROSDK Server project,
  • made the default service non-public, abstract in ServiceBuilder and renamed it to "MyBaseService"
    and
  • created a 2nd Service (“DerivedService”, public, not abstract) with “MyBaseService” as ancestor.

Project can’t be built because “CreateInstance()” is trying to call the protected constructor of “MyBaseService”.

[RemObjects.SDK.Activator()]
[System.Reflection.ObfuscationAttribute(Exclude = true, ApplyToMembers = false)]
public class MyBaseService_Activator : RemObjects.SDK.Server.IServiceActivator
{
    public MyBaseService_Activator()
    {
    }
    public RemObjects.SDK.IROService CreateInstance()
    {
        return new MyBaseService();  // <<<< compile error here, because the MyBaseService constructors are protected
    }
}

As I’ve said earlier this one is known and was fixed already.

Oh, sorry. I’d assumed, that the Activator fix is available in the official beta 1159 whis was available today.

Yes, please send me a beta build containing this fix.