internal static void RemoveImportStatement(EnvDTE.Project project, string targetsPath) { // Need NOT be on the UI Thread MicrosoftBuildEvaluationProjectUtility.RemoveImportStatement(AsMSBuildProject(project), targetsPath); }
private void RemoveImportStatement(string targetsPath) { // Need NOT be on the UI Thread MicrosoftBuildEvaluationProjectUtility.RemoveImportStatement( EnvDTEProjectUtility.AsMSBuildEvaluationProject(VsProjectAdapter.FullName), targetsPath); }
public static void RemoveImportStatement(EnvDTEProject project, string targetsPath) { MicrosoftBuildEvaluationProjectUtility.RemoveImportStatement(AsMSBuildProject(project), targetsPath); }
public override void RemoveImport(string targetPath) { if (String.IsNullOrEmpty(targetPath)) { throw new ArgumentNullException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "targetPath"); } var root = EnvDTEProjectUtility.GetFullPath(EnvDTEProject); // For VS 2012 or above, the operation has to be done inside the Writer lock string relativeTargetPath = PathUtility.GetRelativePath(PathUtility.EnsureTrailingSlash(root), targetPath); if (VSVersionHelper.IsVisualStudio2012) { EnvDTEProjectUtility.DoWorkInWriterLock(EnvDTEProject, buildProject => MicrosoftBuildEvaluationProjectUtility.RemoveImportStatement(buildProject, relativeTargetPath)); EnvDTEProjectUtility.Save(EnvDTEProject); } else { RemoveImportStatementForVS2013(relativeTargetPath); } }