views:

47

answers:

1

I'm tasked to replicate functionality from an existing application. This application relies on .NET managed assemblies accessible from C#. I can import those DLLs in my new C# project but there is no documentation on how to use them.

Yes, this is labeled as an "SDK", but does not contain examples or documentation. Any pointers on how I should proceed?

I thought about creating stub assemblies and monitor their usage from the original application but this involves a lot of code. Is there maybe a tool could do it for me?

+4  A: 

Using the Reflector is the best way to do that. You can see what calls what and examine the dlls in a good and easy way.

You can also try Cecil

They both are great tools for inspecting managed dlls

Svetlozar Angelov
If the dll's are managed then the main exe is probably .net, too.Look how they use their own api.
SchlaWiener
Good advice. Don't forget to disassemble the calling code to see how the API is used in context.
Steven Sudit
Very nice it also decompiles
Eric
Yes, Reflector is the way to go, assuming the assemblies are not obfuscated. It can export a disassembled assembly to a Visual Studio project, which you can then build, add to your solution, and use a VS Test project to write invocations of the classes/methods in the legacy assembly. It's actually a lot of fun when you get the hang of it!
Simon Chadwick