Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

Building from Source

The latest sources of Visual D are available from the github repository at https://github.com/dlang/visuald.

Visual D consists of a number of components that need to be built separately:

Building the Visual Studio extension package

Prerequisites

You need the following tools to build main package of Visual D:

Short build instructions:

Longer build instructions:

There is an AppVeyor project that verifies recent changes to the development branch of Visual D. This can also be used as a reference for the build process.

The Visual D source code is usually updated to work with the latest release version of DMD (2.086.0 as of now), so you should use this release of the compiler when using the latest git checkout.

To start developing or debugging, you should load visuald_vs10.sln in Visual Studio with Visual D installed. The preferred configuration to use is "Debug COFF32|Win32". This chooses building with the Microsoft runtime libraries. As Visual Studio is a 32-bit process, an extension has to be built for that platform, too. Build the "build" project at least once to build the necessary prerequisites and tools, e.g. D translations from the Windows and Visual Studio SDK.

If you want to build against the Digital Mars toolchain using OMF object files, you'll need coffimplib from (http://ftp.digitalmars.com/coffimplib.zip) installed somewhere in your PATH. Use Configuration "Debug OMF|Win32" in that case.

Deployment

You should debug Visual D within Visual Studio using a different branch in the registry, so it does not interfere with your working environment.

$(UL
  • VS2010-VS2019: The mechanism has changed with VS2010, as the non-standard registry settings are rebuilt on every start of Visual Studio.
    • in the following items, VS 2015 is similar to VS 2013 (replace version 12.0 with 14.0), and CS 2019 is similar to VS 2017 (replace version 15.0 with 16.0).
    • Start the IDE with the new settings branch via
      devenv /RootSuffix D
      This will create a new set of settings to be used for debugging.
    • Copy the files from $(VSINSTALLDIR)\Common7\IDE\Extensions\Rainer Schuetze\VisualD into the folder $(APPDATA)\Local\Microsoft\VisualStudio\12.0\Extensions\VisualD (replace 12.0 with 15.0_<id> for VS2017 with <id> some identifier generated during VS installation)
    • Move the files from $(VSINSTALLDIR)\Common7\IDE\Extensions\Rainer Schuetze\VisualD into the folder $(APPDATA)\Local\Microsoft\VisualStudio\12.0D\Extensions\VisualD (replace 12.0D with 15.0_<id>D for VS2017 with <id> some identifier generated during VS installation)
    • in $(APPDATA)\Local\Microsoft\VisualStudio\12.0D\Extensions\VisualD\visuald.pkgdef, replace the path "C:\\Program Files (x86)\\Visual D\\visuald.dll" with your debug build output path.
    • Modify a line in `$(VSINSTALLDIR)\Common7\IDE\devenv.pkgdef:
      -"PkgDefSearchPath" = "$ApplicationExtensionsFolder$;$RootFolder$\Common7\IDE\CommonExtensions;$RootFolder$\Common7\IDE\devenv.admin.pkgdef;"
      +"PkgDefSearchPath" = "$ApplicationExtensionsFolder$;$RootFolder$\Common7\IDE\CommonExtensions;$AppDataLocalFolder$\Extensions;$RootFolder$\Common7\IDE\devenv.admin.pkgdef;"
    • for VS2015 or earlier delete these hives in the registry:
      • HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0D
      • HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0D_Config
    • Start the IDE with the new settings branch via
    • devenv /RootSuffix D
    • Visual D will now be shown in the Extension Manager where it might have to be enabled.

  • VS2008: To create a configuration named "D"
    • As administrator, execute from the command line:
      <path-to-visual-studio-sdk>\VisualStudioIntegration\Tools\Bin\VSRegEx.exe getorig 9.0 D
    • and register the compiled debug plugin with
      trunk\nsis\register.bat
    • The IDE can then be started with the new settings branch via
      devenv /RootSuffix D
  • Building the installer

    The standard build procedure for the release version is to execute "nmake install_vs" in the trunk directory. Please check the variable settings at the top of the Makefile and adjust them to the installation directories on your system.

  • for installer: NSIS. External projects included in installer:
  • Good luck!