public static void RevertPackagePaths(EnvDTE.Project project, IReadOnlyCollection <IVsPackageMetadata> packages, string solutionDir) { var msBuildProject = project.AsMsBuildProject(); var cntModifiedPaths = ModifyPackagePaths(msBuildProject, packages, solutionDir, GetOriginalPackagePath); Logger.Info($"Reverted {cntModifiedPaths} paths."); }
public static void FixPackagePathsAndSaveProject(EnvDTE.Project project, IReadOnlyCollection <IVsPackageMetadata> packages, string solutionDir) { var msBuildProject = project.AsMsBuildProject(); var cntModifiedPaths = ModifyPackagePaths(msBuildProject, packages, solutionDir, GetRelativePackagePath); Logger.Info($"Fixed {cntModifiedPaths} paths."); if (cntModifiedPaths > 0) { project.Save(); } }