Comments
Sort by recent activity
I'll try and edit the FileGenerator addin to do this in the next day or two ... but here is roughly what you need to do for cleaning up the Form files:
Foreach class inheriting from Form
Create new file of same name with extension of .resx
Copy form cs file and rename to new file of same name with extension of .Designer.cs
Foreach .Designer.cs file
Add 'partial' to declaration
Remove contructors
Remove event handlers
Change float numbers to have 'F' instead of 'f' (may not be a problem with VB)
Change AutoScaleMode.Font to System.Windows.Forms.AutoScaleMode.Font
Foreach original form.cs file
Add 'partial' to declaration
Remove control declarations (if instantiated in InitializeComponents())
Remove IContainer declaration
Remove Dispose method
Remove InitializeComponents() method
I'll have to poke around with the schema generator to see how to restore those files too in the next couple of days.
This should be enough for you to get your forms compiling.
Good luck / comments
I'll try and edit the FileGenerator addin to do this in the next day or two ... but here is roughly what you need to do for cleaning up the Form files:
Foreach class inheriting from Form
Create new...
To explain the manual fixes will take sometime and will be easier if I do it on my blog (so i can do images and such).
I'll let you know when I get a post out there for you. Just a heads up - it isn't going to be an easy process for you and will be somewhat painful ... but better than loosing all your work. / comments
To explain the manual fixes will take sometime and will be easier if I do it on my blog (so i can do images and such).
I'll let you know when I get a post out there for you. Just a heads up - it i...
Sorry, didn't realize it was only the xsd file you were looking for. I would start with the xsd.exe utility (can use it from a VS.Net command prompt).
If you know the type in the exe/dll and want an .xsd file generated, you need to use a line like this (where DataSet1 is the name of the type you want to get an .xsd for and WinFormApp.exe is the assembly)
xsd.exe WinFormApp.exe /type:DataSet1
That will generate probably a few xsd files, which you should then be able to piece together into a single on the vs designer will be happy with. You'll have to play with a test app to see what the designer requires, then paste in your generated schema/elements where needed.
Sorry, I don't know of any easier way. Good luck! / comments
Sorry, didn't realize it was only the xsd file you were looking for. I would start with the xsd.exe utility (can use it from a VS.Net command prompt).
If you know the type in the exe/dll and want ...
Sorry to say that you are going to have do to A LOT of work to recover a Windows Forms application. As far as I know, there isn't a good export utility for Reflector to export Winform applications to source code ... this afterall isn't the purpose of Reflector.
Some of the things you're going to need to deal with:
1. converting the .resources files to .resx files
2. splitting the forms files into 2 partial classes
3. deal with strange and incorrect named coversions (like with enums)
It is possible ... but unless you have a lot of complicated layouts that you can't recreate easily - it will be faster to just recreate the forms look and feel and use the .vb files that Reflector exported to copy and paste the functions and subs in your code files. / comments
Sorry to say that you are going to have do to A LOT of work to recover a Windows Forms application. As far as I know, there isn't a good export utility for Reflector to export Winform applications...
If you are talking about Reflector asking for the location of the assemblies, then it would have to do with your Reflector.cfg (look for the [AssemblyCache] and [AssemblyManager] sections).
Reflector doesn't automatically check the GAC like the runtime loader does, though it usually does a pretty good job of figuring out where it is and asks you to confirm it.
Do you happen to know which version of the framework you chose for default when you first opened Reflector? / comments
If you are talking about Reflector asking for the location of the assemblies, then it would have to do with your Reflector.cfg (look for the [AssemblyCache] and [AssemblyManager] sections).
Reflect...
The easiest way to reset Reflector is to delete the Reflector.cfg file. That is were all the settings are stored. / comments
The easiest way to reset Reflector is to delete the Reflector.cfg file. That is were all the settings are stored.
Here's a query to find where an object is instatianted. If you run this example in the Query Editor, it should find any place the System.IO.Stream type is instantiated in the System.Net namespace. (from a in AssemblyManager.Assemblies.Cast<IAssembly>()
from m in a.Modules.Cast<IModule>()
from t in m.Types.Cast<ITypeDeclaration>()
from mt in t.Methods.Cast<IMethodDeclaration>()
where ((ITypeReference)mt.DeclaringType).Namespace == "System.Net"
where mt.Body is IMethodBody
from i in ((IMethodBody)mt.Body).Instructions.Cast<IInstruction>()
where i != null && i.Value != null && i.Value is IMemberReference
&& ((IMemberReference)i.Value).Name == ".ctor"
&& ((IMemberReference)i.Value).DeclaringType is ITypeReference
&& ((ITypeReference)((IMemberReference)i.Value).DeclaringType).Name == "Stream"
&& ((ITypeReference)((IMemberReference)i.Value).DeclaringType).Namespace == "System.IO"
select mt).Distinct()
There are 3 things you'll need to change:
1. Namespace filter (in example above = "System.Net")
2. Type name (in example above = "Stream")
3. Type namespace (in example above = "System.IO")
Let me know if it doesn't find everything you need - it looks for calls to the class's constructor so it won't look at fields or return types. / comments
Here's a query to find where an object is instatianted. If you run this example in the Query Editor, it should find any place the System.IO.Stream type is instantiated in the System.Net namespace....
I updated query editor to do Import/Export of queries. The query I mentioned above is available for import from http://jasonhaley.com/files/InstantiatedByFilterByNamespace.xml
You will need to download the latest version of the Reflector.PowerCommands addin (v1.3.3.36545). / comments
I updated query editor to do Import/Export of queries. The query I mentioned above is available for import from http://jasonhaley.com/files/InstantiatedByFilterByNamespace.xml
You will need to dow...
I've dug around a bit and don't really see any way to tap into the Analyze functionality.
What type of extensions to the Analyze functionality are you guys thinking about? / comments
I've dug around a bit and don't really see any way to tap into the Analyze functionality.
What type of extensions to the Analyze functionality are you guys thinking about?
Hmm, I'd say its doable with the Query Editor. Let me see if I can figure out the query needed.
So basically you're looking for any field, method, property, event that has a type reference to a specific type in a given namespace?
The Query Editor doesn't specifically support queries for a selected namespace, but you can type it in the query editor.
Give me a day and I'll see if i can figure it out for you. / comments
Hmm, I'd say its doable with the Query Editor. Let me see if I can figure out the query needed.
So basically you're looking for any field, method, property, event that has a type reference to a sp...