Reputation: 1804
To start off, while I was searching around for answers, I found these:
Reverse Engineering a C# Solution
Are there good tools for C# reverse engineering?
Above url seem like a possible duplicate. I did not find any answers relating to my question around the web so I am asking it here. What I would like to ask is, Can I take a C# solution build generated by Visual Studio 2008 Professional version and generate the source code?
I do not care about UML diagrams like the above questions posted in those url, I want to get source code.
My application is in ASP.NET but I only have a solution build for it, and I need source code which I don't have.
Upvotes: 0
Views: 3926
Reputation: 28069
www.reflector.net is great for this.
For example, here is some C# code:
using System;
namespace HW
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Foo Bar");
}
}
}
When compiled, Visual Studio generates the following files:
Reflector decompiles the code like this:
Like TomTom says, it isn't the same code, but this is still useful to discover how a program works.
Hope this helps
Upvotes: 7
Reputation: 62127
Can I take a C# solution build generated by Visual Studio 2008 Professional version and generate the source code?
No. You can get a .NET dll (noone cares how it was generated) and have a decompiler generate SOME code if it was not encrypted, but it will not be THE source code.
Stuff like internal variable naming will be different, likely. COmments will be missing. Stuff the compiler optimized out may be different
For example bytes / 1024 / 1024 will be byte / 1048576, as constant expressions are not making it into the DLL.
Upvotes: 6