Search code examples
c#sqldecompiler

Decompiled C# Project Config File


I work for an engineering company who had a software engineer who has left. He designed software for the company but the source code cannot be found. I have decompiled the exe and have got it nearly running. My last issue (I hope) is that the connection string for the database is stored in an XML config file and when the project was created from the decompiler a config was not included.

My question is How do I add the config file so the decompiled project will use it? Or is it possible?

I am using Visual Studio 2013 if that makes a difference.


Solution

  • Typically the connection string data is stored the app.config file, when the application is compiled this turns into the myapplication.exe.config file.

    If you have the <appname>.exe.config file, you could just copy the contents with the connections string details into your own the app.config file in your project.

    If your project does not have an app.config, simple right click the project in the Solution Explorer and choose Add Item and select "Application Configuration File".