xsharp.eu • Missing assembly reference to VulcanVO-Classes?
Page 1 of 1

Missing assembly reference to VulcanVO-Classes?

Posted: Fri Jun 21, 2019 8:01 pm
by Silvio
Hi,

my first attempt to migrate a small VO-Appl to X# failed at this point:
error XS0246: The type or namespace name 'FIXEDTEXT' could not be found (are you missing a using directive or an assembly reference?)

Same error occurs with PUSHBUTTON, CHECKBOX, DATAWINDOW and so on.
References to all VulcanVO...Classes.dll are added.
Sorry for my stupidity.
Silvio

Missing assembly reference to VulcanVO-Classes?

Posted: Sat Jun 22, 2019 10:59 pm
by Chris
Hi Silvio, sorry I somehow missed your post. If you have already added the references, then what's missing is enabling the compiler option "Enable Implicit namespace lookup",in VS you can find it in the Project Properties, Language page, while in XIDE it is in App properties/Compiler page. Didn't you use VOXporter to port your app? It should had enabled this option by default.

What this option does is to tell the compiler to automatically recognize the namespace of the classes in the references and resolve the class names without specifying their full name (if you use the Vulcan SDK classes, then the full name for FixedText is Vulcan.VO.FixedText). So another option would had been to specify the classes with their full names, or alternatively use a

USING Vulcan.VO

in the beginning of your .prg files, both would take care of the compiler error. But it is usually much easier simply enabling the compiler option mentioned above.

Missing assembly reference to VulcanVO-Classes?

Posted: Sun Jun 23, 2019 10:32 pm
by Silvio
Hi Chris,
perfect, thanks :)
Silvio