Creating installation package for module using standard Kentico form controls

I need to create installation package for custom Kentico module. I created the package as per https://docs.kentico.com/k10/custom-development/creating-custom-modules/creating-installation-packages-for-modules, so now I have separated web app project holding my custom functionality. Further I need to create custom form control that uses a Kentico form control (UniSelector), I created it in the module's web app and it looks like this

The issue is that CMSAdminControls_UI_UniSelector_UniSelector type doesn't exist in module's web app assembly (it exists in the main CMSApp assembly), so module's project can't be built. I see two solutions:

Include UniSelector.ascx (and all dependent ASCXes) in the module's project, but it may possibly lead to runtime error 'CMSAdminControls_UI_UniSelector_UniSelector type is ambigious', because the system will try to load it types from both CMSApp assembly, where it lives by default, and from the module's assembly. And I believe it is not a good way to exclude UniSelector from the CMSApp project.

To reference CMSApp assembly in the module's project so that CMSAdminControls_UI_UniSelector_UniSelector type can be found there.

Recent Answers

I would copy the uniselector control itself into your project and reference it as such, it's a control so i doubt it will be in the assembly files (i could be wrong though, you can try to see if some of the drivers in the LIB folder contain it).