You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a component which requires both net462 and .NET design time support, so i have created stub RootDesigners for net462 and .NET, but i cant apply them without conditionall compilation
The following line seems to work only for net462 environment.
[Designer("Server.CompoundObjectRootDesigner", typeof(IRootDesigner)), ToolboxItem(false)]
In .NET environment it leads to the following error:
So for .NET i have to use this, but it will not work in net462 environment:
[Designer("CompoundObjectRootDesigner", typeof(IRootDesigner)), ToolboxItem(false)]
Is it possible to support same convention for both targets? Or is conditional compilation the recommended approach:
#if NET462
[Designer("Server.CompoundObjectRootDesigner", typeof(IRootDesigner)),
ToolboxItem(false)]
#else
[Designer("CompoundObjectRootDesigner", typeof(IRootDesigner)),
ToolboxItem(false)]
#endif
Thanks
The text was updated successfully, but these errors were encountered:
valiahmetovv
changed the title
Designer attribute not working with namespace
How to avoid conditional compilation when using Designer attribute?
May 2, 2024
He @KlausLoeffelmann
I have a component which requires both net462 and .NET design time support, so i have created stub RootDesigners for net462 and .NET, but i cant apply them without conditionall compilation
The following line seems to work only for net462 environment.
[Designer("Server.CompoundObjectRootDesigner", typeof(IRootDesigner)), ToolboxItem(false)]
In .NET environment it leads to the following error:
So for .NET i have to use this, but it will not work in net462 environment:
[Designer("CompoundObjectRootDesigner", typeof(IRootDesigner)), ToolboxItem(false)]
Is it possible to support same convention for both targets? Or is conditional compilation the recommended approach:
#if NET462
[Designer("Server.CompoundObjectRootDesigner", typeof(IRootDesigner)),
ToolboxItem(false)]
#else
[Designer("CompoundObjectRootDesigner", typeof(IRootDesigner)),
ToolboxItem(false)]
#endif
Thanks
The text was updated successfully, but these errors were encountered: