Setup: have the portable version of Manifold 9.0.167 installed in c:\programs\manifold-9.0.167-x64. Verify that it launches (can find the license of 9 and does not ask for a serial number).
Launch Microsoft Visual Studio. I used Visual Studio Community 2017 with .NET desktop development workload installed.
Invoke File - New - Project. In the template tree on the left, select Visual C#, Windows Desktop. In the template list on the right, select Console App (.NET Framework). Click OK. (Visual Studio creates a project.)
In the Solution Explorer, right-click the Properties node and invoke Open. Select the Build tab. Under Platform target, uncheck the 'Prefer 32-bit' option (we are going to use 64-bit).
In the Solution Explorer, right-click the References node and invoke Add References. Click Browse at the bottom of the dialog. Navigate to c:\programs\manifold-9.0.167-x64\bin64 and select EXTNET.DLL. Click OK.
In PROGRAM.CS, provide example code for Program.Main:
static void Main(string args)
using (Manifold.Root root = new Manifold.Root(
Manifold.Application app = root.Application;
using (Manifold.Database db = app.CreateDatabase())
using (Manifold.Table table = db.Search("mfd_root"))
Console.WriteLine("Fields in mfd_root:");
Manifold.Schema schema = table.GetSchema();
foreach (Manifold.Schema.Field field in schema.Fields)
Build, run / debug, and you should have the code launch the runtime of 9, create a new database (temporary MAP file), and list all fields in its MFD_ROOT.
You can omit the path in the call to new Manifold.Root(), then the system will try to locate 9 in the default installation folder under Program Files.
The STAThread attribute is currently mandatory because parts of the runtime use system services that require apartment threading. We will probably relax this in the future (and let those parts fail graciously with free threading, which is the default for .NET projects).
Hope this helps.