User Tools

Site Tools


namespaces_migrated_applications

This is an old revision of the document!


Namespaces in migrated VO applications

Migrated applications does not have indicated any namespace, therefore some special rules apply. Normally, such applications use the compiler option /ins (use implicit namespace), so the compiler adds the needed namespaces from the runtime libraries to the program (you can see that if you open the compiled exe with a tool like ILSpy.

When you migrate a VO app with the name DictEdit, then the generated Assembly name by the Exporter is DictEdit.EXE and the Default Namespace is also DictEdit

Please note that this default namespace is only used with:

- when you enable the option “Prefix classes with Default Namespace”. In that case, the class Foo becomes DictEdit.Foo

- when you create files inside Visual Studio. A new class “Class1” will be generated as DictEdit.Class1. When the new class file is in a folder “Test” then VS generates code for the class as DictEdit.Test.Class1.

The functions class in a migrated application is derived from the assembly name and not from the default namespace.

When the assembly name is DictEdit.Exe, then the name of the functions class is DictEdit.Exe.Functions When the assembly name is DictEdit.Dll, then the name of the functions class is DictEdit.Functions

The compiler automatically adds a using DictEdit.Exe.Functions inside each of the programs in your app (assuming DictEdit.Exe is your assembly name). So there is no need to prefix the code with Functions. If you do want to prefix then I would recommend to use the full name: DictEdit.Exe.Functions.Start()

(Comment by R.v.d.H.: https://www.xsharp.eu/forum/topic?p=30999#p30999)

namespaces_migrated_applications.1726030589.txt.gz · Last modified: 2024/09/11 04:56 by wolfgangriedmann