Path to exe in dll when used in ASP.NET MVC Application in Debug
I've written a wrapper for a 3rd party exe. The exe is in a folder inside my class library project and is deployed with the dll.

Unit testing the method that starts the process containing this exe works fine but when I use the dll inside by web application, the exe cannot be found.

Debugging I see that the path to the exe is not correct when used from my web application.

I've tried:

    string processPath = Path.Combine(Environment.CurrentDirectory, @"folder\file.exe");
and 

    string processPath = Path.GetFullPath(@"folder\file.exe");

as well as simply:

    var processStartInfo = new ProcessStartInfo(@"folder\file.exe");

Is there something I can use to refer to the folder relative to where the dll is stored (i.e. in the bin for my web app)?


Path to exe in dll when used in ASP.NET MVC Application in Debug
===

I've written a wrapper for a 3rd party exe. The exe is in a folder inside my class library project and is deployed with the dll.

Unit testing the method that starts the process containing this exe works fine but when I use the dll inside by web application, the exe cannot be found.

Debugging I see that the path to the exe is not correct when used from my web application.

I've tried:

    string processPath = Path.Combine(Environment.CurrentDirectory, @"folder\file.exe");
and 

    string processPath = Path.GetFullPath(@"folder\file.exe");

as well as simply:

    var processStartInfo = new ProcessStartInfo(@"folder\file.exe");

Is there something I can use to refer to the folder relative to where the dll is stored (i.e. in the bin for my web app)?

