.Designer files not recognized in VS 05

J

James

When using 2005 I create a new Form and VS displays the .Designer file below
the main .cs file at the same level as the resx file. But, if I manually
create a MyFom.cs file and a MyForm.Designer.cs partial class files the
..Designer file does NOT display below the like it should. Why not? How
can I fix it?

thanks,

JIM
 
A

Andy

When using 2005 I create a new Form and VS displays the .Designer file below
the main .cs file at the same level as the resx file. But, if I manually
create a MyFom.cs file and a MyForm.Designer.cs partial class files the
.Designer file does NOT display below the like it should. Why not? How
can I fix it?

Well, I'd just use the New Item to create the form class..

But if you close and reopen the solution, will that not correct the
layout?
 
J

James

I already have all my code ( about half a million lines ) from VS2003 .Net
1.1 which was converted by Visual Studio automatically when I upgraded to
2005 .Net 2.0. It did not take my .cs Form files and split them out to
..Designer. And no, it does not auto recognize the fact when I exit and
restart VS. Thanks for the idea though.



JIM
 
A

Andy

I already have all my code ( about half a million lines ) from VS2003 .Net
1.1 which was converted by Visual Studio automatically when I upgraded to
2005 .Net 2.0. It did not take my .cs Form files and split them out to
.Designer. And no, it does not auto recognize the fact when I exit and
restart VS. Thanks for the idea though.

Ahh... Didn't know you were coming from VS2003. The upgrade wizard
won't split your files out for you, you'll have to do that manually
(which I take it you've been doing). Typically, simplying using
the .Design.cs postfix for the file should be enough for VS2005 to
nest the file.

Are you just trying to Add new Item using the naming scheme, or are
you recreating the original .cs file as well?

Andy
 
A

Andy

I already have all my code ( about half a million lines ) from VS2003 .Net
1.1 which was converted by Visual Studio automatically when I upgraded to
2005 .Net 2.0. It did not take my .cs Form files and split them out to
.Designer. And no, it does not auto recognize the fact when I exit and
restart VS. Thanks for the idea though.

FYI, here's what I tried.

Single .cs file containing the entire form code (Form2.cs).

Add new Item to the folder containing the form code, using the
Form2.Designer.cs file name.

VS2005 immediately pushes the designer file under the existing form.
From there it was a matter of adding the partial class modifier and
moving the generated code to the designer class.

Andy
 
J

James

Hmmm, it doesn't for me. What release version are you on. I may be out of
date with an old version that didn't work. Mine deffinately does not
immediately recognize they face and auto nest the file. I may need to do a
complete re-install from my MSDN account CD's

thanks,

JIM
 

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

Top