Background Plug-in not loading

I’m creating a plug-in. The Plug-in is installed , visible ( and controllable ) in the management client. But the BackgroundPlugin does not seem to be loading. I really am lost on this, other plug-ins do load and show up in event log :

example

:calling:BackgroundPlugin.Init(), in randomBackgroundPlugin

Pug-in loading in event log:

PluginLoader AlarmRecording, loaded from:[C:\Program](file:C:/Program) Files\Milestone\MIPPlugins\AlarmRecording\AlarmRecording.dll

There is stuff in the public override void Init of the AlarmRecording BackgroundPlugin Log entry’s now only.

BackgroundPlugin definitions creates a GUID ( i changed it to be sure its not a weird duplicate)

using framework 4,8 ( also tried 4,72 ) milestone 2022 R2, visualstudio sdk 22.2.0 SDK.

Please check if you have following setting in your code:

/// <summary>
/// Define in what Environments the current background task should be started.
/// </summary>
public override List<EnvironmentType> TargetEnvironments
{
	get { return new List<EnvironmentType>() { EnvironmentType.Service }; }	// Default will run in the Event Server
}

Also please try to restart Event Server When you deploy your plugin.

FYI - this might be helpful for debugging background plugin - https://developer.milestonesys.com/s/article/debugging-techniques-for-Event-Server-plugins

Yes, I am restarting services ( and did a reboot, and such tried it all) and my backgroundplugin includes the code you provide.

I found the debugging steps, but since the background plugin does not get loaded, i cant debug it.

The dll looks to be placed he right place, please double check the Plugin.def, is it in the same place and include the right xml/text..

Found the problem, there was an issue with the resources file for some reason, so i removed all and added them again. Resources used some .png files for pictograms. No idea why they did not load, but this fixed it.