Error XS1061

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Anonymous

Error XS1061

Post by Anonymous »

Hi all,

We started a couple of days ago with a conversion project from VO to X#. The customer has a class 'DBServerKL' that is inherited from DBServer.


Error XS1061 'DBServerKL' does not contain a definition for 'OrderDescend' and no extension method 'OrderDescend' accepting a first argument of type 'DBServerKL' could be found (are you missing a using directive or an assembly reference?)

DBServer is well recognized but as soon as there is a class that is derived from it, all methods seem to get lost.

I have looked at the compilerproperties. All Vo/Vulcan compatibility switches are set to true.

Is there anyone who has an idea how to solve this?

Jan
User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Error XS1061

Post by wriedmann »

Hi Jan,

AFAIK you need to add a reference to the right assembly (VODBserver) also in the executable where you are using the subclass, and if I remember correctly, also a using statement.

But I have to check it out better.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Error XS1061

Post by wriedmann »

Hi Jan,

maybe I have to explain better.

I suppose the DBServerKL class is defined in a library. This library has a reference to VulcanVORDDClasses and compiles.

Then you are using the DBServerKL class in an executable, and this executable has no reference to the VulcanVORDD classes. You need to add this, otherwise the DBServer methods and properties are not recognized.
You will have the same issue also with classes from the .NET framework.

The VO compiler hadn't this issue, it works in a different manner as it includes all classes from all used libraries.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
jan_timmer

Error XS1061

Post by jan_timmer »

Hi Wolfgang,

Thanks for your answer. I have a reference to the VulcanVORDDClasses.
and now added using statement: using Vulcan.VO. This seems to do the trick.

It takes a while before the intellisence sinks in and displays something useful.

Anyway. problem seems solved!
User avatar
robert
Posts: 4529
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Error XS1061

Post by robert »

Jan,
Jan Timmer wrote:Hi Wolfgang,
It takes a while before the intellisence sinks in and displays something useful.
Code completion is must better in the next build (beta 12 for FOX subscribers)
Fabrice has made some great improvements.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4922
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Error XS1061

Post by Chris »

Hi Jan,

In addition to what Robert said, the new build 12 (to be released in a very few days) also has several compiler improvements regarding compatibility with VO. So several (but of course not all) of the errors you will be seeing when trying to compile unmodified VO code with build 11 are not present anymore with build 12.

Also regarding the need to add USING Vulcan.VO statements, you can avoid this by enabling the "Enable implicit namespace lookup" project option (also in the Language page), this way the compiler will automatically take care of this.

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply