.d

How to open a .d file

Quick, free ways to open D on any system.

A .d file is a D Source File. If double-clicking does nothing, your computer simply does not have an app that reads D yet. Here is how to fix that on each operating system, using free software wherever possible.

Open a .d file step by step

  1. Confirm the file really is a .d. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
  2. On Windows, open it with VS Code (code-d) or any text editor.
  3. On Mac, use VS Code (code-d) or any text editor.
  4. On Linux, try VS Code (code-d) or any text editor.
  5. Still stuck? Convert the .d to exe (compiled), which opens more widely.

Best apps to open .d files

Windows

  • VS Code (code-d)
  • any text editor

macOS

  • VS Code (code-d)
  • any text editor

Linux

  • VS Code (code-d)
  • any text editor
!
Before you open it: Caution. A .d file is program source. Compiling and running it executes its code; review unfamiliar files first.

Frequently asked questions

Why can't I open my .d file?

Almost always because no installed app understands D. Install one of the apps above, or convert the file to a format your existing software already reads.

How do I run a .d file?

Install a D compiler (dmd, ldc or gdc) and run dmd -run file.d, or manage a project with dub, D's package and build tool.

Is every .d file a D program?

No. Compilers and Make generate .d dependency files, which are plain lists of file paths. If the content is code with imports and braces, it is D source.

Learn more about .d