Hi,
Neither the native IVSHierarchy nor the automation EnvDTE.ProjectItem seem to offer a property to get the relative path of a file to the path of its parent project, so:
1) First, think if your requirement is really needed. Why do you need a relative path?
2) If it's really needed, use the methods provided by .NET to get a relative path. See for example:
How to get relative path from absolute path
http://stackoverflow.com/questions/275689/how-to-get-relative-path-from-absolute-path
* My new blog about VSX: http://www.visualstudioextensibility.com * Twitter: https://twitter.com/VSExtensibility * MZ-Tools productivity extension for Visual Studio: http://www.mztools.com.