Try

System.Reflection.Assembly.GetExecutingAssembly().Location

This will return the location (including the DLL/exe name) of the assembly being executed as a string. So just remove the dll/exe name, and add the name of the keyfile.

I've never done this in an assembly file, so unsure if it will work for sure, but give it a try.