Roughly speaking, the whole purpose of GAC is that you never need a path from it. You just reference an assembly by its full name. To see how it's done in the project, please see how some assembly bundled with .NET is referenced, such as "System.Windows.Forms.dll". Please also see my comments to the question.
Even if you need to load the assembly from the GAC dynamically, you should rather use
System.Reflection.Assembly.Load(string assemblyString)
, please see the example on this page:
http://msdn.microsoft.com/en-us/library/ky3942xh.aspx[
^].
You code for "current executing directory" is questionable. You can have 1) location of the assembly where you function is called; 2) more usually used, the location of the main module of the entry assembly; 3) working directory.
Note that different assemblies of your application can be placed in different directories; there a different methods of assembly resolution, based on config file or code.
Right methods would be:
static string GetAssemblyDirectory(System.Reflection.Assembly assembly) {
return System.IO.Path.GetDirectoryName(assembly.Location);
}
string callerAssemblyLocation = GetAssemblyDirectory(System.Reflection.Assembly.GetExecutingAssembly());
string entryAssemblyLocation = GetAssemblyDirectory(System.Reflection.Assembly.GetEntryAssembly());
string workingDirectory = System.IO.Directory.GetCurrentDirectory();
Please see:
http://msdn.microsoft.com/en-us/library/system.reflection.assembly.aspx[
^].
—SA