a twilight zone moment

J

jhcorey

This morning I opened a project in VS that I hadn't touched for months.
There's many tabs at the top representing open files.
Among them are two that look very similar:
myCtrl.ascx.vb:1
myCtrl.ascx.vb:2

I'd neven seen this situation before. There's only one myCtrl.ascx.vb
file.

When I try to load the ascx into the designer I get an error saying it
cannot be loaded because none of the classes can be designed.

Any explanations for this?

TIA,
Jim
 
A

Andy Fish

This morning I opened a project in VS that I hadn't touched for months.
There's many tabs at the top representing open files.
Among them are two that look very similar:
myCtrl.ascx.vb:1
myCtrl.ascx.vb:2

I'd neven seen this situation before. There's only one myCtrl.ascx.vb
file.

When I try to load the ascx into the designer I get an error saying it
cannot be loaded because none of the classes can be designed.

Any explanations for this?

hmm, "visual studio sucks" would be my best guess
 
P

Patrice

1) This is usually the notation used when you use multiple window for the
same file.
2) No particular idea. Perhpas do you miss a compoent used on this page in
your toolbox ? I would try to crreate another page with only this control to
see if it looks related to this user control or to some other component...


Patrice
 
C

Craig Deelsnyder

This morning I opened a project in VS that I hadn't touched for months.
There's many tabs at the top representing open files.
Among them are two that look very similar:
myCtrl.ascx.vb:1
myCtrl.ascx.vb:2

I'd neven seen this situation before. There's only one myCtrl.ascx.vb
file.

I also believe this means the same file is just opened twice. This can
happen by design, I can't remember if it's when you double-click on a file
to open it again, VS.NET asks if you want to close the existing copy, you
can say no and end up with 2....
When I try to load the ascx into the designer I get an error saying it
cannot be loaded because none of the classes can be designed.

Any explanations for this?

TIA,
Jim

This is usually because you haven't compiled anything, so the IDE doesn't
know where to find the code-behind/dll to instantiate the controls, forms,
etc. Try closing the pages, compiling once (successfully) then try
reopening and designing....
 
K

Kevin Spencer

Hi Andy,
hmm, "visual studio sucks" would be my best guess

This reminds me of something Winston Churchill once said about Democracy.
Forgive me if I paraphrase:

"Democracy is the worst form of government invented - except for all the
other forms that have been tried."

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
M

Matt Berther

Hello Andy,
hmm, "visual studio sucks" would be my best guess

This added a lot to the discussion and clearly helped the OP to resolve his
problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top