0

I was working on a sharepoint 2013 farm solution to implement an event receiver inside visual studio 2012 professional. now when i try to build/run the project i got an error that there is not space on the disk. so i closed Visual Studio, free some space on the server, re-open the project. but i found that my code inside the ER .cs file have been removed (almost half the code has been removed!!).

but i have the .wsp file for my project, so i am not sure if i can rely on this .wsp to get mt ER .cs source code?. now i try to change the file extendion from .wsp to .cab, where i got those files:-

enter image description here

but unfortunatly none of them contain the ER .cs code. so can anyone adivce on this please?

Thanks

2

You can use free trial of .Net Reflector tool to view the source code of dll files.

Decompiled Source code would not be the exact same as that was in your .cs files but you will get an overall idea of your source code.

  • @Yatati I used a tool named dotPeek where i was able to decompile my .dll and get the event receiver source code, but i have noted that on the decomplied source code all the comments have been removed + all the variables got new names such as str1 str2 instead of the friendly names i use to have.... also i use to have some public override methods which were changed to public virtual.. so not sure if i should trust this decomplied source code.. – john Gu Apr 18 '18 at 10:36
  • 1
    Yep decompilation is never going to give you back your source, rather it’s re-created from what the compiler already turned your source into. Better than nothing in this case. As for trusting it, you could re-compile from the de-compiled source and run your tests against it to satisfy yourself. – sasfrog Apr 18 '18 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.