Comments
Sort by recent activity
Rather than Reflecting across the assembly (which is going to find two types that implement IServiceProvider), you could new an instance of ApplicationManager. IServiceProvider sp = new Reflector.ApplicationManager(null);
IAssemblyManager am = (IAssemblyManager)sp.GetService(typeof(IAssemblyManager));
ITranslatorManager tm = (ITranslatorManager)sp.GetService(typeof(ITranslatorManager));
/ comments
Rather than Reflecting across the assembly (which is going to find two types that implement IServiceProvider), you could new an instance of ApplicationManager. IServiceProvider sp = new ...
The context menu (right button menu) has the option "Export..." when you have an assembly selected - this generates a project file and the various class files for a given assembly. / comments
The context menu (right button menu) has the option "Export..." when you have an assembly selected - this generates a project file and the various class files for a given assembly.
Reflector Pro stores information about the decompiled set of methods in a database that it maintains at your equivalent of C:\Profiles\clive.tong\Local Settings\Application Data\Red Gate\.NET Reflector 6\Cache\MethodLocations.db
From the information in the stacktrace, it looks as if this data file has got corrupted. We can confirm this if you send the file to us.
You can workaround the problem by deleting the file - you will lose location information for existing decompiled assemblies, though this will be regenerated when assemblies are decompiled in the future.
I'd add some more error handling code into the next EAP to stop this crashing.
Thanks for the detailed report, which I've logged as RP-719. / comments
Reflector Pro stores information about the decompiled set of methods in a database that it maintains at your equivalent of C:\Profiles\clive.tong\Local Settings\Application Data\Red Gate\.NET Refle...
Thanks for the detailed report - I'll take a look at it. / comments
Thanks for the detailed report - I'll take a look at it.
Under the Resources node under the assembly, Reflector will show you the resources that are embedded into the assembly. That might help you to generate a resx file. / comments
Under the Resources node under the assembly, Reflector will show you the resources that are embedded into the assembly. That might help you to generate a resx file.
Thanks - I'll take a look. / comments
Thanks - I'll take a look.
Hi.
How are you looking at the ExceptionHandlers collection?
For your particular example, if I put a breakpoint on the method that writes the IL body of a method, I see that the exception handlers count is 1.
((IMethodBody)value.Body).ExceptionHandlers.Count
0x00000001
This is how the .try is being generated by Reflector in the disassembly, so if there were no exception handlers in the collection, there wouldn't be a .try line in the disassembly. In your example, when Reflector shows you the disassembly, is there a .try line present? If not, could you please email me the example assembly at clive DOT tong AT red HYPHEN gate DOT com
Thanks / comments
Hi.
How are you looking at the ExceptionHandlers collection?
For your particular example, if I put a breakpoint on the method that writes the IL body of a method, I see that the exception handlers ...
I think this is due to some places in your addin where you are passing around the wrong representation of the instructions. There appear to be two representatios - one as the standard IL instruction stream and another containing the results of MapWithHandlerInstructions, which returns instances of several classes to represent the boundaries of Try/Catch/Finally/Fault. There are a couple of places in the code where the latter form is expected, but the former is provided; this means that several type tests (using as) fail to get triggered and analysis fails.
I "fixed" some code in the OnAnalyze method of LeakedExceptionsCatchBlockInstructionAnalyzer and the LeakedExceptionsTryBlockInstructionsAnalyzer to use the second form, and now I get 340/340 tests passing.
I hope that helps. I can email you the changes I made if that would help you, if you send me your address to clive DOT tong AT red HYPHEN gate DOT com. / comments
I think this is due to some places in your addin where you are passing around the wrong representation of the instructions. There appear to be two representatios - one as the standard IL instructio...
If you check it in "Available Add-ins" column, the menu should then get added. / comments
If you check it in "Available Add-ins" column, the menu should then get added.
The next thing to have a look at is the Tools/Add-in Manager dialog.
Can you have a look to see if ".NET Reflector" appears and is checked?
If it doesn't appear, then the addin should have been installed for the current user by putting a file named Redgate.reflector.addin into a subdirectory of the user's Dopcuments (for example c:\users\administrator\documents\visual studio 2008\addins\), so can you check to see if has been placed there?
Thanks. / comments
The next thing to have a look at is the Tools/Add-in Manager dialog.
Can you have a look to see if ".NET Reflector" appears and is checked?
If it doesn't appear, then the addin should have been ins...