views:

116

answers:

2

We think most of the source has been recovered through .NET Reflector. A utility which export the dll as C# source.

The only missing part is WinForms which is not included when .NET Reflector export the dll source.

Is there any way to get the WinForms recover from dll?

Thanks.

+1  A: 

If it's not in the dll, you can't get it out :-)

But possible some class files are the forms you're searching for. Maybe you have to add a reference to System.Windows.Forms.dll to your project.

Rhapsody
any other utility that can do this?
Ramiz Uddin
what would you suggest what should we do next?
Ramiz Uddin
First you have to verify if the Windows Form is actually in the dll. If it's not in the dll file, it is impossible to recover them since there's nothing to recover. Are you sure the forms are in the dll?A WinForm is nothing but a collection of partial classes; a Designer and Code. So when exporting the whole assembly, add a reference to System.Windows.Forms.dll and try to figure out which classes are most likely forms.
Rhapsody
@Rhapsody I think it didn't export without System.Windows.Forms.dll
Ramiz Uddin
Reflector is able to export everything, but the result is often a project with some errors because several references are not added. But I see in a different comment that you're getting errors when you open a form in the designer. Can you post those errors?
Rhapsody
A: 

From Visual Studio 2005 on, Windows Forms classes are partial classes split into a Designer generated part (MyForm.designer.cs) and your actual implementation (MyForm.cs). You can see that in Explorer when you create a new Form from scratch.

In order to resolve your problem you would have to split up the class exported by Reflector the same way that Visual Studio does: Place the InitializeComponent() method and all control declarations into the MyForm.designer.cs file and the remaining code into the MyForm.cs file.

0xA3
@divo thanks I like the idea :) i'm going to try it
Ramiz Uddin