I discovered an interesting bug where the Application.ExecutablePath property returns the wrong path.  I haven’t debugged this thoroughly to determine why the problem occurs, but I thought I would share my experience.  Here’s my setup:

  • Visual Studio 2008
  • Solution with a DLL, and a WinForms EXE that references the DLL

When I run the application in the Visual Studio debugger, ExecutablePath returns the DLL path instead of the EXE path!  Note that if I run the EXE directly from Windows Explorer, ExecutablePath returns the EXE path correctly.

Read the rest of this entry »