Question

I work on a existing ASP.NET MVC project. The solution uses the FluentNHibernate component(v 1.0.0).

Someone in the former team (solution was MVC2) that worked on it modified the component sources (in order to change a behavior). That modified and compiled dll was included in the MVC solution.

Now, I converted the solution to the MVC 5, and updated the existing libraries via NuGet packages. Unfortunately, I can't do it the same with FluentNHibernate component, because if I update it, it looses the modified behavior, and produces errors if I use a newer version.

The sources of the modified component aren't available. What can I do?

I decided to obtain the FluentNHibernate version 1.0.0 from the gitHub, compare the project files, note the differences, and include it in the actual (v 1.4.0.0) FluentNHibernate code.

In order to compare the differences, I need to obtain the original code from the (modified) dll.

Is there a add-in or something that could convert a dll to a project?
I know (and I use) the RedGate's Reflector, but I would like to obtain all necessary c# files from the dll, and not just view a class definition code.

Was it helpful?

Solution

If your dll has be created in .NET langage (C# / Vb.NET), it can be decompiled with some tools, like JetBrains dotPeek or Telerik JustDecompile. These tools can make all C# files and project file from a dll (or a exe).

Be carefull if your dll/exe has been obfuscated, the result code will be hardly readable (you'll have to use rename a lot).

In dotPeek and JustDecompile, right click on loaded dll, and choose "Create Project" (or "Export to project"). You'll get all C# files (or vb.net) and project file.

In some case, one of these tools will not be able to decompile. You can test another tools, it can work ...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top