[This is preliminary documentation and is subject to change.]

Generates a plugin

Namespace: Tools.TotalCommanderT.PluginBuilder
Assembly: TCPluginBuilder (in TCPluginBuilder.exe) Version: (


public class Generator
Visual Basic
Public Class Generator
Visual C++
public ref class Generator
type Generator =  class end
public class Generator


This class generates one or more Total Commander pluggin wrappers from given assembly/types. Wrapper generation process can be invoked from command line or programatically using Generator API. Separate wrapper is generated for each plugin class. Wrapper generation consists of following steps:
  1. Prepare wrapper template - Template is copied to intermediate directory (either from specified template directory or from built-in template)
  2. Configure tamplate - Type wraper is being generated for is inspected to detect plugin type and which methods the plugin implements. Appropriate settings are generated to template files. Namely: Conditional compilation is set up to generate only those functions supported by plugin; Module export definition is written; Assembly info is generated.
  3. Invoke compiler - C++ compiler invoked via MSBuild to compile the wrapper. MSBuild and C++ compiler must be installled on your machine.
Following rules apply to plugin being generated: Wrapped debugging info is copied to target only when CopyPDB is set. Do not set this to true when name of your plugin DLL and plugin wrapper are same but the extension. (Your debugging info will be overwritten with almost useless debugging info of wrapper.)

To genereta plugin wraper for your plugin from Visual Stuidio environment as part of build process, simply add plugin generator tool TCPluginBuilder.exe as post-build event. Example post-build event:


This command line invokes TCPluginBuilder.exe and generates plugin(s) from output of project, places the w?x files into project output directory and uses project obj directory as its intermediate directory. Intermediate files are not deleted. Built-in template is used. w?x assembly is not signed.
TCPluginBuilder.exe "$(TargetPath)" /out "$(TargetDir)\" /int "$(ProjectDir)obj\$(ConfigurationName)" /keepint

Deploying the plugin:

When Total Commander refuses to load your plugin try following troubleshoting tips:

  • Place plugin files inside the same directory as TOTALCMD.EXE or one of subdirectories.
  • Windows Vista: If you are ceating subdirectory inside Total Commander directory you will copy plugin for testing during development and you are changing rights on the directory in order to get rid of UAC, do not make yourself owner of the directory.
  • Restart Total Commander in order to test a new version of your plugin.

Inheritance Hierarchy


See Also

Collapse/expand Version History


  • Property VCBuild removed. Class now use MSBuild which is referenced as assembly. Reference to VCBuild.exe removed from settings as well.
  • Property SN removed. Class now use MSBuild task to sign resulting assembly. Reference to SN.exe removed from settings as well.