tags:

views:

692

answers:

1

According to the MSDN, the BaseDirectory is where an AppDomain will look for DLLs to load, while ExecutablePath will provide the path to the original executable file (including file name). I know that one has the file name and the other does not. I know that if I create a new AppDomain I can give it a different path. But removing the file name from ExecutablePath and assuming I'm only using one AppDomain, in practice, what is the difference between those two paths? Will they always be the same (again, assuming only one AppDomain)? Is there an instance when they would be different?

+2  A: 

Think of something like ASP.NET where your code is hosted inside another process. The BaseDirectory is going to be where your code lives, but the ExecutablePath is probably some dll in system32.

Orion Edwards