I tried changing this code to use GetExecutingAssembly().Location, but it returned a path to a folder in the temp directory, instead of the Output\Debug directory. I will just leave this code as is for now.