user9969 user9969 - 2 months ago 8
C# Question

How do I get Bin Path?

I need to the the bin path of the executing assembly.
How do you get it?
I have a folder Plugins in the Bin/Debug and I need to get the location

Answer

Here is how you get the execution path of the application:

path = System.IO.Path.GetDirectoryName( 
      System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);

MSDN has a full reference on how to determine the Executing Application's Path.

Comments