How to trigger the MyPluginBackgroundPlugin.cs part of my plugin ?

I added a MessageBox.Show() into the Init() and Run() methods of my BackgroundPlugin class (automatically generated by the MIPPlugin template).

Even though the plugin is present in the Management Client and the Smart Client, none of my message box appears when I run the Smart Client.

What do I need to get it running by itself ?

Thank you by advance.

You might want to define in what Environments the current background task should be started. In this case, please find following code;

public override List<EnvironmentType> TargetEnvironments
{
    get { return new List<EnvironmentType>() { EnvironmentType.Service }; } // Default will run in the Event Server
}

EnvironmentType.Service means that this works in the Event Server and this is a default setting. If you change the code in the following way, then you will be able to see messagebox when you start Management Client, Smart Client and Event Server.

   get { return new List<EnvironmentType>() { EnvironmentType.Service, EnvironmentType.SmartClient, EnvironmentType.Administration }; }

Thank you for your answer. I ended up manually calling the Init() method of the background task, from the main plugin class.

If TargetEnvironments is correctly returned the BackGround plugin should start automatically. Did you try this? Or did you already have your workaround implemented?