Component · dotNetCore4Delphi

.Net Core Importer

A graphical wizard for importing .NET Core assemblies into Delphi — from a local DLL or EXE, or straight from NuGet with full dependency resolution and a generated deployment manifest.

 Free Trial    Order    Documentation

The .Net Core Importer is part of the dotNetCore4Delphi Professional Edition.

The problem it solves

Consuming a third-party .NET library has historically meant hand-locating the assembly, hand-writing its fully-qualified name and version string, and chasing every transitive dependency yourself — the most common source of support tickets: "it can't find the assembly", "missing dependency", "wrong version". The Importer's Add from NuGet flow hands that job to the tool that already knows how to do it — NuGet.

How NuGet import works

  • 1. Search. Find a package by id, or type one in, and pick the version you want.
  • 2. Resolve. The package and its full transitive dependency closure are restored into an isolated working folder.
  • 3. Target. Choose the lib/<tfm> that matches the runtime you are targeting.
  • 4. Generate. The same type-import pipeline runs over the resolved DLL set and emits ready-to-compile bridge units.
  • 5. Deploy. A generated *.deploy.txt manifest lists exactly which DLLs to ship — the answer to the native-asset and folder-deployment questions the AI packs raise.
The friction it removes
// Before - from the shipped ReadMe, written by hand:
SYSTEM_DATA_COMMON_DLL =
  'C:\Program Files (x86)\dotnet\shared\...\System.Data.Common.dll';

SYSTEM_DATA_COMMON_ASSEMBLY_STRING =
  'System.Data.Common, Version=5.0.0.0, Culture=neutral, ' +
  'PublicKeyToken=b03f5f7f11d50a3a';

// With Add from NuGet:
//   1. search "System.Data.Common", pick a version
//   2. dependency closure resolved for you
//   3. bridge units + System.Data.Common.deploy.txt generated

Why it matters beyond convenience

Every wrapper pack we ship — including the AI4Delphi line — is produced by this same pipeline, so importing your own NuGet packages uses the same tool, not a lesser version of it.

Requirements and notes

  • Requires a dotNetCore4Delphi Professional Edition licence.
  • Requires the .NET SDK / NuGet client on the development machine for the NuGet flow — the tool detects it and guides you if it is missing.
  • Transitive graphs can be large; the tool surfaces the whole graph so you can trim what you import.
  • Private and authenticated NuGet feeds, lockfile pinning, version-conflict diagnostics and headless CLI generation for CI are on the roadmap.

Buying the AI packs too? The deployment manifest is the answer to the folder-deployment and native-asset questions the Orchestrate, Agents and Predict packs raise.

.Net Core Importer — A Closer Look

Four steps — Assemblies, Types, Loading, Output — take you from a local DLL/EXE or a NuGet package to ready-to-compile Delphi units. The screenshots are the importer's dark theme, the default.

Step 1

Assemblies

Start from a file you already have, or let NuGet do the work of finding one.

  • Drop one or more .dll or .exe files on the window, or press Browse for assemblies.
  • Or press Add from NuGet, type a package id (for example Newtonsoft.Json), leave Version empty for the latest or type one, and press Resolve.
  • The result lists the package and its full transitive dependency closure — the package itself marked imported, everything it needs marked dependency (ship). Press Add to import.
  • Each assembly then appears as its own card; its Delphi unit name is editable.
  • Resolved packages are cached under %LOCALAPPDATA%\CrystalNet Technologies\Importer\NuGet — point CNIMPORT_NUGET_WORKDIR elsewhere for a build server or shared cache.
A message explaining what is missing The wizard tells you exactly what is still missing before you can move on — no guessing.
The first page, with nothing added yet
The first page, with nothing added yet The Add from NuGet dialog A resolved NuGet package with its dependencies Two assemblies added

Click a screenshot to view it full size

Step 2

Types

Only what you check is written to the units — nothing is checked when you arrive.

  • Every type has a round badge: C class, I interface, S structure, E enumeration, D delegate.
  • Check a type to import it, which checks all of its members; open a type to check or clear single constructors, fields, properties, methods and events.
  • The search box matches any part of a type's full name; a filter narrows the list to one kind.
  • Show the selected types only is a quick way to review a selection; Select all and Clear act on what the search and filter are currently showing.
  • Types an obfuscator renamed to characters Delphi cannot compile are marked — leave them out on the Output page.
A type with its members
The Types page A type with its members Searching the type list

Click a screenshot to view it full size

Step 3

Loading

Tells the generated units where to find the assembly when your Delphi program runs. Every assembly has its own card.

  • From a file location — the default: loads from the folder the assembly was added from.
  • From the folder of the application — loads next to your Delphi executable, the usual way to deploy.
  • UnsafeLoadFrom — loads a file Windows marked untrusted (downloaded, or from a network share); unblocking the file is usually the better fix.
  • Dependency folders — add the folders an assembly's own dependencies live in. NuGet assemblies already have theirs alongside them.
The Loading page

Click the screenshot to view it full size

Step 4

Output

Choose the folder, check the plan, import.

  • The generated .pas files are written to the unit folder — add it to your project's library path.
  • Leave out obfuscated names skips types and members an obfuscator renamed, so the units still build.
  • Press Import: the progress window shows the assemblies being analysed, then the units written. Cancel stops at the next step; files already written stay.
  • When it is done, every file is listed with its folder and any error. Open folder shows the units in Explorer.
  • For a NuGet package, the deployment manifest (<package>.deploy.txt) is among the files — exactly what to ship.
The Output page
The Output page The import running The finished import

Click a screenshot to view it full size

×