🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Turnkey local development tips
This page was created by Hans.karlsen on 2019-07-14. Last edited by Wikiadmin on 2026-07-29.

You can use Windows directory symbolic links to keep Turnkey asset source code outside the local MDriven Turnkey installation while making it available to the Turnkey web application.

Why use symbolic links

When you run MDriven Turnkey locally, the web server must find assets such as SCSS, CSS, and EXT_Components beneath the Turnkey application tree. Keeping your working source files inside that installed tree can make source-control and upgrade workflows harder.

A Windows directory symbolic link is a directory entry in the Turnkey tree that points to a directory elsewhere on disk. Turnkey reads the linked directory as though its files were located in the application tree, while you continue editing the files in your own source directory.

For example, you can keep a component in:

C:\Source\EcoProject1_AssetsTK\EXT_Components\MoveAroundInGrid

and expose it to a local Turnkey installation at:

C:\LocalTurnkey\Application\EXT_Components\MoveAroundInGrid

Create a directory symbolic link

  1. Decide which directory Turnkey must see. This is the link path and belongs beneath the local Turnkey application directory.
  2. Locate the directory containing the files you edit. This is the target path and can be in your source repository.
  3. Ensure that the link path does not already contain a directory or files that you need.
  4. In a Windows command prompt, run mklink /D, placing the link path first and the target path second.
mklink /D "C:\<turnkey core location>\EXT_Components\MoveAroundInGrid" "C:\<source code location>\EcoProject1_AssetsTK\EXT_Components\MoveAroundInGrid"

The command reports that it created a symbolic link. The directory under EXT_Components is now the link; the directory in EcoProject1_AssetsTK remains the source of the files.

Example with concrete paths

mklink /D "C:\LocalTurnkey\Application\EXT_Components\MoveAroundInGrid" "C:\Source\EcoProject1_AssetsTK\EXT_Components\MoveAroundInGrid"

After creating this link, edit files in:

C:\Source\EcoProject1_AssetsTK\EXT_Components\MoveAroundInGrid

Turnkey can find the same files through:

C:\LocalTurnkey\Application\EXT_Components\MoveAroundInGrid

Use quotation marks around both paths. They make the command work when a path contains spaces.

Link other asset directories

Use the same pattern for each directory that must be present beneath the Turnkey application tree. The linked directory must be placed at the path Turnkey expects, while its target can remain in the project asset directory.

Asset type Link path under the local Turnkey application Target path in your source tree
An EXT component EXT_Components\MoveAroundInGrid EcoProject1_AssetsTK\EXT_Components\MoveAroundInGrid
CSS or SCSS assets The corresponding asset directory required by the application The matching directory in <YourModel>_AssetsTK

Keep the directory structure consistent between the link path and the target. For example, a component intended for EXT_Components\MoveAroundInGrid must target that component's directory, not an unrelated parent directory.

Remove a symbolic link

To remove a directory symbolic link, run rd against the link path:

rd "C:\<turnkey core location>\EXT_Components\MoveAroundInGrid"

This removes the link entry from the Turnkey directory. It does not remove the target directory that contains your source files. Verify that the command path is the link under the Turnkey application before running it.

When to use this approach

Use symbolic links when you are running a local Turnkey application and want a short edit-refresh loop for assets without copying those assets into the Turnkey installation. This is useful for work on custom components, CSS, SCSS, and page-related assets.

For a local prototyping workflow in which <YourModel>_AssetsTK is mirrored to a local Turnkey site, see Documentation:Faster prototyping with Turnkey. For a Visual Studio local Turnkey setup and page overrides based on a ViewModel, see HowTos:Development in Visual Studio. For generic Turnkey code debugging and use of ExternalAssetsTK, see HowTos:Debug Turnkey Generic Code.

Troubleshooting

Symptom Check
Turnkey does not find the component or asset Confirm that the link path is beneath the local Turnkey application directory and matches the directory name Turnkey expects.
The command fails for a path containing spaces Enclose both the link path and target path in quotation marks.
You are about to remove a link Confirm that the path passed to rd is the link in the Turnkey tree, not the source directory in your repository.
You need to debug the local Turnkey application rather than only change assets Follow HowTos:Development in Visual Studio or HowTos:Debug Turnkey Generic Code.

See also