Not LLBLGen, but Catch 22. How do I fix this?

Posts   
 
    
Markiemac
User
Posts: 132
Joined: 25-Apr-2006
# Posted on: 28-Jun-2006 21:28:38   

After a lot of work on a new form, I cannot now load the form in design mode. The warning message I get is 'Duplicate component name 'EmployeeIdDataGridViewTextBoxColumn'. Component names must be unique and case-insensitive.'

This is obviously understandable, but I wasn't aware that I had duplicated a component name and VS won't let me load the form in design mode to investigate further.

The warnings (not errors) are only displayed when I try to load the form in design mode otherwise I can rebuild, compile and run my project, including the form with the supposed error, successfully.

I've got the feeling I've stumbled onto a VS2005 problem, but how do I get out of it. I'd like to enhance my form but unfortunately the problem appeared before I could back it up. confused

Am using V2 beta + Adapter + VB.

Thanks for any thoughts and help.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 28-Jun-2006 22:58:43   

Webform? Open it in 'markup' (solution explorer -> view markup in context menu on aspx) then fix the id.

Frans Bouma | Lead developer LLBLGen Pro
Markiemac
User
Posts: 132
Joined: 25-Apr-2006
# Posted on: 29-Jun-2006 00:43:33   

Sorry, I should have said it's WinForm.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 29-Jun-2006 08:59:14   

perhaps in the resx file? You can't have 2 variables defined if you can compile the stuff normally.

Frans Bouma | Lead developer LLBLGen Pro
Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 29-Jun-2006 17:18:10   

You need to open the form.designer.cs file and edit it manually. the Error on the designer usually will indicate what line is cuasing the problem.

And you best get used to this kinda thing as it happens often rage

Markiemac
User
Posts: 132
Joined: 25-Apr-2006
# Posted on: 29-Jun-2006 19:50:33   

Answer,

The sound you can't hear is my sinking heart confused

Having opened my form.Designer file at the designated line number(s) - there were 2 warnings - neither of the lines corresponds to the 'Duplicate component name' warnings. I've experimented and commented out the lines (there's no alternative - they simply add controls) and my DataGridView just vanishes, so it looks as if I'll have to recreate the entire form.

What bugs me is that the project compiles without any warnings or errors, so I guess there's something else going on, but ...

If I'm going to have to get use to this, what's your strategy for dealing with these occurences?

Thanks

<Edit> But.. right after posting I deleted the form.resx file and it recompiled ok. Then went back to try the form in design mode, and it's there simple_smile

Frans, as usual you're right on the button!

perhaps in the resx file?

I do wonder though why deleting the resx file solves the problem.

Answer: I'm still interested in your strategies for dealing with this stuff simple_smile

Thanks again

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 30-Jun-2006 09:02:25   

what's your strategy for dealing with these occurences?

I think the best strategy, is to use a source control, and more often you should backup youor work (check in files), so if anything like this happens, you could go back to the last working version and start from there, rather than building the entire form from the start.

jspanocsi
User
Posts: 145
Joined: 04-Mar-2005
# Posted on: 30-Jun-2006 21:22:02   

This happens a LOT more in vb.net than c# also. (in fact, I don't ever remember it happening in c#)

Have you gotten the pink screen of death yet simple_smile

Markiemac
User
Posts: 132
Joined: 25-Apr-2006
# Posted on: 03-Jul-2006 14:25:16   

jspanocsi wrote:

Have you gotten the pink screen of death yet simple_smile

You have got to be kidding, what does it look like frowning