Determine the source location / build path of exe using .Net Reflector or another tool

I have an exe that is currently deployed on our production server (C # .net 2). I inherited the task of making some changes to this application and redeploying it.

I did not write this application, and I pointed to several different folders on different network drives with several different Visual Studio solutions (~ 10), which were different spells of this application in time and could be applicants for Visual Studio, which was used to create this exe , but I don’t know which project was used, which corresponds to the production EXE.

Is there a way to use .net Reflector or another tool to determine the source path to the file that lay in the source files when they were used to compile the EXE , then I can work back to determine the correct Visual Studio and start making changes there.

thanks

+4
source share
2 answers

It sounds like one hell of a situation if you cannot understand what happened in what is happening in production.

However, one possible solution is to look at the debug header of the .exe assembly, if it was compiled using debugging symbols, it may contain the original full path to pdb, giving you the key to where it was built. You can get it using the dumpbin tool, which is part of the sdk window.

Here is an example output:

  Debug Directories Time Type Size RVA Pointer -------- ------ -------- -------- -------- 4A0F2A94 cv 51 0006672C 6492C Format: RSDS, {77468AA8-8494-46AC-87DF-422721517504}, 8, C:\sources\mcs\class\Mono.Cecil\obj\Debug\Mono.Cecil.pdb 

Even better, if you have pdb, you can use a tool like pdbdump to find out which files were used to compile the assembly.

+7
source

It is best to use Reflector and one of the file generator plugins at http://www.codeplex.com/reflectoraddins to upload the code to files. Before making any changes, make sure that you can recover.

0
source

Source: https://habr.com/ru/post/1300078/


All Articles