Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically convert VS2003 classes to partial Designer.cs files?

I'm upgrading a project from Visual Studio 2003 to 2008 and wish to automatically generate XXX.Designer.cs files and update the corresponding XXX.cs original one.

Any automatic way to do it?

UPDATE: I'm referring to WinForms. Of course, I know the old style works but i'm looking for a way to go to the new style without doing it by hand.

like image 779
FerranB Avatar asked Apr 17 '09 23:04

FerranB


2 Answers

There is a macro out there floating that does this. I have used it and it works great. Start by looking at Nathan Jones Blog. If you dont have much luck then download a zip of the macro source (I posted) from VSCONVERT - PasteBin

like image 112
John Alexiou Avatar answered Sep 20 '22 13:09

John Alexiou


The original classes will continue to work - even with the Visual Studio designer. The code the VS puts in the Designer classes is simply meant to remove the designer "noise" into a separate file so you can focus on the non-visual code in your class.

Once you migrate the project to VS2008 using the wizard, you can open up your forms in VS and continue to edit them just like you did before. Any new forms that you create will get Designer backer files.

like image 43
Paul Alexander Avatar answered Sep 20 '22 13:09

Paul Alexander