protected static string GetFullPathInProjectContext(ProjectInstance projectInstance, string path) { string fullPath = path; if (!Path.IsPathRooted(path)) { string projectDir = projectInstance.GetPropertyValue(MSBuildProjectDirectory).Trim(); fullPath = Path.Combine(projectDir, path); fullPath = Path.GetFullPath(fullPath); } return fullPath; }