Exemplo n.º 1
0
        public void DeleteAllUnusedArgFiles()
        {
            IEnumerable <string> fileNames;

            if (cmdPackage.IsUseSolutionDirEnabled)
            {
                fileNames = vsHelper.GetSupportedProjects().Select(FullFilenameForProjectJsonFileFromProject);
            }
            else
            {
                fileNames = new[] { FullFilenameForSolutionJsonFile() }
            };

            foreach (var fileName in fileNames)
            {
                try
                {
                    File.Delete(fileName);
                }
                catch (Exception e)
                {
                    Logger.Warn($"Couldn't delete '{fileName}': {e}");
                }
            }
        }