# Plugin Configuration

In addition to the .DLL file or files that implement the plugin, each plugin directory must include a Plugin.config file that provides information about the plugin.

The Plugin.config is used to identify the plugin; there should be only one such file in the directory and all its sub directories. This file contains meta-data about the plugin, to allow Designer to make a decision on whether to load that plugin or not.

A unique plugin is identified by its CompanyName, Name and Version. If two plugins are the same, and can be loaded (i.e. they are both compatible) then Designer will not load. You will receive an error message saying that duplicate Plugins were detected.

The Plugin.config file is an XML file that must adhere to the following structure:

    <?xml version="1.0" encoding="utf-8"?>
    <PluginConfig>
    	<CompanyName>company</CompanyName>
    	<Name>plugin name</Name>
    	<DisplayVersion>version_string</DisplayVersion>
    	<Version>version</Version>
    	<TargetAPI>api_version</TargetAPI>
    	<Architecture>architecture</Architecture>

    	<CompatibilityChecks>

    		<ExecutableCheck>
    			<ExecutableFileName>PathToExe.exe</ExecutableFileName>
    			<ExecutableParameters>/debug</ExecutableParameters>
    		</ExecutableCheck>

    		<InstalledProductCheck>
    			<Type>ProductCode</Type>
    			<ProductCode>95120000-00b9-0409-0000-0000000ff1ce</ProductCode>
    		</InstalledProductCheck>

    		<InstalledProductCheck>
    			<Type>UpgradeCode</Type>
    			<UpgradeCode>3f9aef1b-b1cd-11d4-866b-0050041addaf</UpgradeCode>
    			<MinVersion>82.99.3.202</MinVersion>
    			<MaxVersion>83.0.0.0</MaxVersion>
    		</InstalledProductCheck>

    	</CompatibilityChecks>
    </PluginConfig>

where:

- CompanyName: is the name of the company that created the plugin.
- Name: is the name of the plugin.
- DisplayVersion: is a string representing the customer-visible version of the plugin; plain text that is used for display purposes only.
- Version: is the plug in version number, in X.Y.Z format. For more information on versioning plugins, see Plugin and Versioning Guidelines.
- TargetAPI: is the Designer API version. You can find the actual API version in the .
- Architecture: can be Any, x86, or x64.
- CompatibilityChecks: Conditions that need to be checked before loading the plugin. Compatibility checks are optional.
  - ExecutableCheck: This check is done by an executable file and returns 0 for a pass.
  - InstalledProductCheck: Checks if the installed (and required) products are existent.
    - Type: ProductCode or UpgradeCode
    - ProductCode: Checks if a program with the given GUID is installed.
    - UpgradeCode: Checks if a product is installed with the matching GUID (and between the Min and Max versions specified).
    - MinVersion: The minimum version of the product installed with the matching GUID.
    - MaxVersion:The maximum version of the product installed with the matching GUID.

A simplistic, concrete example for the LED HMI sample plugin:

    <?xml version="1.0" encoding="utf-8"?>
    <PluginConfig>
     <CompanyName>MyCompany</CompanyName>
     <Name>My LED</Name>
     <DisplayVersion>1.0.0.0</DisplayVersion>
     <Version>1.0.0.0</Version>
     <TargetAPI>2.0</TargetAPI>
     <Architecture>Any</Architecture>
     <CompatibilityChecks />
    </PluginConfig>