Global Properties removed when changing something in the Radzen IDE

I have setup a global variable like here in the MainLayout

Only when starting in the Radzen IDE the code gets generated, this seems to be different for global variables, normaly code gets generated when I close the window where I can invoke the methods or set properties.

But when I now change somewhere else code, eg. set a new property in any page and press OK, then the globals properties are reset.


image

This makes it hard to debug in eg VisualStudio, because it is necessary to start at least once through the Radzen IDE before I can start it through VisualStudio after making changes.
Is this an expected behavior or an bug?

Edit:
Just saw, that also the Inject of the global service in the page that the new test1 property was set got removed:

[Inject]
        protected GlobalsService Globals { get; set; }

Thanks

Hi @awalz,

Unfortunately I'm unable to reproduce this. I've added new Test global property and after that I've added new local Page property Test2 - GlobalService code didn't changed:

Injected globals also was not removed:

Please try adding a variable on another page.
I have just tested to add a property in the main layout, where I also have the global variable, then the property in the global service will not be removed (like in you example).

curious...
I could easily reproduce it.
Tested it with existing project and an new created one.

Here are the steps to reproduce:

  • Just created a new project with Radzen 2.66.11 without a datasource.
  • Create a page
  • Add a global vaiable to Main layout
  • Hit Start on Radzen IDE
    • Property in GlobalService gets created
  • Hit Stop on Radzen IDE
  • Add a variable in the page created before.
    => property in GlobalService is removed.

Just sent you an Email with an video that I recorded showing it.

If you could not reproduce it, then I will try to reinstall Radzen again.

I was able finally to reproduce it! We will provide fix for this in our next update early next week. Thanks for the report!

Happy to hear,
Thanks!