Is there a way to generate a compile-time error in .NET? Here's the situation: I'd like to generate a compile-time error when a person drops a control onto one of the Winforms in my project and does NOT add that control to my "internal controls" collection. When they try to compile I'd like to issue an error stating "txtCustomer is not a member of myInternalControlsCollection - please see InternalControls.cs for instructions". Is this possible? Alternative solutions would be appreciated if it's not. Thanks!