I am trying to get the root folder of the application. I have used the following code, but this gives the bin
folder, but what I need is the root folder of the
Your program has no knowledge or link to its development environment, so there's no other way for it to know the solution directory other than you to tell him.
Either go to the parent-parente directory, as other have suggested, or pass it as an argument in the executable, or check this SO post (How do you get the solution directory in C#) that have neat ways to do this.