Link to home
Start Free TrialLog in
Avatar of Codeforlife
CodeforlifeFlag for South Africa

asked on

C# - cannot build DLL from extracted source code I changed

Hi Experts, i was recently asked to make a change to some code in a c#we based application. I decompiled the DLL with the code I need to change using software ILSPY and .NET reflector with filegen add on. I tried both these decompilers. i then saved the source code. changed the code that needed to change. I then opened the source code project file in Visual Studio 2017 to build the DLL file again. But getting like a 107 errors mostly reading identifier expected in parts of the code such as "public static readonly HomeController.<>c <>9 = new HomeController.<>c();" It shows that the "<>" in the code is the issue. Also more errors in the code read "Type or namespace definition, or end of file expected". Could this be due to encrypted code or obscurity? I urgently need to get this resolved.
Avatar of Codeforlife
Codeforlife
Flag of South Africa image

ASKER

sorted- i see .net reflector asked for 2 dll dependancies upon extraction of source code. After specifying the correct dll's it extracted the source code perfectly
Wait - sorry upon further checking of source code there are still some of the code giving issues as described above? could there be more dependancies?
Avatar of Miguel Oz
The DLL may be obfuscated and you may need to fix some of the issues manually I am afraid.
You may try to reverse engineer some of the code by using using ideas from:
http://www.c-sharpcorner.com/UploadFile/ajyadav123/bypassing-obfuscation-ciphered-code-reverse-engineering/
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.