Workspace plugin: exception _viewItemManager is null

I’m developing a workspace plugin.

If i use ViewAndLayoutItem.InsertBuiltinViewItem with a camera all is ok.

When i try to use

ViewAndLayoutItem.InsertViewItemPlugin(1, new MyViewItemPlugin(), new Dictionary<string, string>());

The constructor of MyViewItemPlugin is called, but the GenerateViewItemManager method isnever called and i obtain the following error:

Error: PlatformViewItem ():ConfigCompleteInit - _viewItemManager is null - May result in ViewItem not being initialized correct (viewid=d78b24fa-3038-4d2f-815c-7d6c1bbef3ae, index=1)

By this error i cant understand what is my error.

Best Regards.

Please see this Smart Client Workspace sample and please compare to your code - https://doc.developer.milestonesys.com/html/index.html?base=samples/scworkspace.html&tree=tree_search.html?search=scworkspace