I'm writing a dll which will be used in several environments, namely from our build machine. The program is responsible for getting a file's FileVersion. I'm using the following code within the .dll:
public string GetVersion(string filePath)
{
FileVersionInfo temp = FileVersionInfo.GetVersionInfo(filePath);
return temp.FileVersion;
}
Now when I run this function from the WPF test application I wrote everything works correctly; all values are filled out for the FileVersionInfo object.
However when I run this exact same function from within a Console Application project all the values in the FileVersionObject are null.
Anyone have any idea what's going on?