Quote:
files in shared project cannot access custome controls in main project
That's part of the idea: shared controls should be moved to a second project and then referenced from there by any project that needs them.
From what you say, the controls are still in the main project, which is the wrong place.
Additionally, in order to be accessible outside the current project / assembly, they need to be declared as
public
(or possibly
protected
/
protected internal
:
Access Modifiers - C# Programming Guide | Microsoft Docs[
^]