Fixed a crash for solution items

Fixed an issue where it would crash when the file was a solution level
item rather than nested inside a project