SettingsDirectoryAllUsers - inconsistent

I am using
to store some data / settings for my plugin
Rhino 7 (latest Version), on Windows 10
Dotnet-Framework 4.8
Rhinocommon c#
Visual Studio 2019

My customer still uses Rhino 7.

I do not get a consistent Path - Folder-Name
sometimes - mostly with the DEBUG configuration I get the expected:
SettingsDirectoryAllUsers = C:\ProgramData\McNeel\Rhinoceros\7.0\Plug-ins\PathTest (cb80f951-e330-44dd-91a6-df464d8ebcfc)\settings

other times - mostly with RELEASE configuration - the name of the plug-in is missing - the folder starts with a space
SettingsDirectoryAllUsers = C:\ProgramData\McNeel\Rhinoceros\7.0\Plug-ins\ (cb80f951-e330-44dd-91a6-df464d8ebcfc)\settings

minimal code snippet that shows at least the problem / error / bug on my machine:
a standard rhino 7 template with the following OnLoad override

protected override LoadReturnCode OnLoad(ref string errorMessage)
            RhinoApp.WriteLine("Plugin s Name = " + Name);
            RhinoApp.WriteLine("SettingsDirectoryAllUsers = " + SettingsDirectoryAllUsers);
            return base.OnLoad(ref errorMessage);

Am I doing something wrong ? - or is it a bug ?

I can write a few lines of code to fix it with a workaround.

thanks -tom

Hi @Tom_P,

So far in my brief testing, I’ve been unable to reproduce (darn).

What if you call SettingsDirectoryAllUsers later, after your plug-in has been loaded?

– Dale

@dale thanks - I always appreciate your support:

I added a hidden test command to output the value later on demand. - so I can tell you as soon as this (inconsitent) behaviour occurs next time.

The ugly think is, it also happens on the customers machine, that I can not access it frequently.
I will write some workaround and use GetDataDirectory and add the missing subfolders to the path with error-tracking and feedback…

meanwhile - thanks
kind regards - tom