-3

I have a file called Asembly-CSharp.dll i want to edit in C#. I decompile it with .NET reflector's FileGenerator (also tried file disassembler and dotPeek) plugin, thus creating a visual studio project, i open it in visual studio, but it fails to build, i didn't change anything, yet i get lots of errors (like unexpected characters etc), the dll refers to lots of other dlls but even if i put all of them in one solution it fails. Why does it fail if i didn't change anything in the source code (.NET framewrok version is the same as it was before decompilation). Any help appreciated.

I tried both visual studio 2012 and 2013 (win7 but i know that shouldn't be the problem) I'm not professional, forgive me if i made some silly mistake.

Drew McGowen
  • 11,471
  • 1
  • 31
  • 57
user196569
  • 31
  • 1

1 Answers1

2

Reverse engineering needs a bit of effort. Nothing comes for free. You need to manually fix those errors.

Mostly these errors occur because either Reflector decompiles the code with compiler-generated variable names that are valid in IL but not in C#, or because that particular assembly was written in some other language that supports features that cannot be directly translated to C#.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Sriram Sakthivel
  • 72,067
  • 7
  • 111
  • 189