예제 #1
0
        public static void DeleteItems(this IVsProject project, List <string> paths)
        {
            project.EnsureIsCheckout();
            var projectDir = project.GetProjectBaseDirectory();

            project.RemoveGeneratedItemCustomMetadata(paths);

            var sliceCompileDependencies = paths.Select(
                p =>
            {
                return(Path.Combine(Path.GetDirectoryName(p),
                                    string.Format("SliceCompile.{0}.d", Path.GetFileNameWithoutExtension(p))));
            }).Distinct().ToList();

            foreach (var path in sliceCompileDependencies)
            {
                if (File.Exists(path))
                {
                    try
                    {
                        File.Delete(path);
                    }
                    catch (IOException)
                    {
                    }
                }
            }
        }