Usercontrol and error finding Main.Connectionstring

Posts   
 
    
cornball
User
Posts: 4
Joined: 09-Dec-2005
# Posted on: 24-Jan-2006 15:41:03   

Hello all.

The error I get is the following when I try to drop a usercontrol onto another form. The usercontrol contains nothing but a dropdown that binds to a generated collection (self-servicing).

Error: Failed to create component 'usrProviderCTDropdown'. The error message follows: 'The key 'Main.ConnectionString' does not exist in the appSettings configuration section.'

My attempted solutions that do not work:

I have copied the app.config that was generated to my executable part of the project like everyone should.

Then I even went as far to create app.configs for subsequent projects in the solution and copied the main.connectionstring key/value pair to each one. But I still get the error. I am at a loss on what to do. Searching the forums here I haven't run into a solution.

Any help is appreciated. I really need to have the ability to use my usercontrols multiple times.. and can't at teh moment... which means I have the same code a multitude of times.. not good.

Thanks.

cornball
User
Posts: 4
Joined: 09-Dec-2005
# Posted on: 24-Jan-2006 18:56:18   

No ideas of yet. So let me mention that I have had no other problems.

Several projects in the solution that all work with the generated code as expected.

The usercontrol itself doesn't pose any problems, only when I drop it onto another form in a different project.

This is in edit mode of vs.net 2005.

Trying to think of anything else I can supply that may help someone help me.

Thanks,

cornball

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 25-Jan-2006 11:04:55   

The only old thread I could find is this one: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=181

Lazy loading is triggered somewhere which requires the main.connection string to be set in the app.config file, though this is pretty odd, and I haven't been able to find any solution to this up till now. disappointed I know it's frustrating.

Frans Bouma | Lead developer LLBLGen Pro
cornball
User
Posts: 4
Joined: 09-Dec-2005
# Posted on: 26-Jan-2006 15:06:59   

Well, if this is the only problem that I have, I'm a very happy person.

I'll check back to see if a solution is ever found.

Thanks.

cornball