Building from Source
The latest sources of Visual D are available from the github repository at https://github.com/dlang/visuald.
You need the following tools to build Visual D:
- Visual Studio 2013/2015 (other versions might also work, VS 2017 was ok until update 15.3.1)
- a recent version of Visual D
- Visual Studio Integration SDK for VS2013 or enable it during VS 2015 or VS 2017 installation.
- Windows SDK 6.0A (included in VS2008) or later (tested with most versions up to 10.0.15063.0)
- DMD 2.071 or newer
- coffimplib from (http://ftp.digitalmars.com/coffimplib.zip)
- for installer: NSIS. External projects included in installer:
Visual D consists of a number of components that need to be built separately:
- visuald: the core package loaded as a language service by Visual Studio: visuald_vs10.sln
- dparser: the semantic engine integrated as a sub module: vdc/abothe/VDServer.sln
- vdextensions: some extensions to visuald only accessible via C#: vdextensions/vdextensions.csproj
- dbuild: MSBuild integration: msbuild/dbuild/dbuild.csproj
- mago: the debug engine: ../../mago/MagoDbg_2010.sln
- cv2pdb: conversion of CodeView 4 debug information into PDB file: ../../trunk/cv2pdb/src/cv2pdb_vs12.sln
- pipedmd, dcxxfilt: additional command line tools in the "tools" folder
Building Visual D
- Load visuald_vs10.sln into Visual Studio 2013+.
- Select configuration "Debug COFF32"/Win32
- Build project "build".
- Build project "VisualD".
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.077 as of now), so you should use this release of the compiler when using the latest svn/git checkout.
If you want to start developing or debugging, you should load visuald_vs10.sln in Visual Studio with Visual D installed. 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.
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.
You should debug Visual D within Visual Studio using a different branch in the registry, so it does not interfere with your working environment.
- VS2010-VS2017: The mechanism has changed with VS2010, as the non-standard registry settings are rebuilt
on every start of Visual Studio.
- 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 14.0 for VS2015, 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 14.0D for VS2015, 15.0_<id>D for VS2017 with <id> some identifier generated during VS installation)
- in 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;"
- in the registry, delete hives
- 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.
- 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
- The IDE can then be started with the new settings branch via
devenv /RootSuffix D