I have a project solution consisting of two class libraries and a Windows Application. The two libraries are split into Custom_Classes and Custom_Controls.
Im my Custom_Classes library I have a entity model that is referenced from my Custom_Controls library to access certain data members. The connections work fine and when I add a control to my windows form it does not have any problems. But when I want to add a custom control inside another one dragging it from the toolbox the following message appears.
Failed to create component 'u_Settings'. The error message follows: ' No connection string named 'MyEntitiesCon' could not be found in the application config file.'
I have made sure that the connection string is in the app.config file and even tried adding it in the project settings file. Here is my connection string copied from the Custom_Classes project to the Custom_Controls project
<connectionStrings>
<add name="MyEntitiesCon" connectionString="metadata=res://*/Enity_Framework.SP_Model.csdl|res://*/Enity_Framework.SP_Model.ssdl|res://*/Enity_Framework.SP_Model.msl;provider=System.Data.SqlClient;provider connection string="data source=XXX\XXX;initial catalog=XXX;integrated security=True;connect timeout=30;connectretrycount=2;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
I have tried a bunch of solutions but with no success