void CleanUpOldFormatFiles(DotNetProject proj) { FileService.DeleteFile(proj.GetPackagesFilePath()); // TODO: In F# there is no /Properties FileService.DeleteDirectory(proj.GetPropertiesDirPath()); FileService.DeleteFile(proj.GetProjFilePath()); }
public string GenerateProjForNetStandard() { var packagesFileParser = new PackagesFileParser(); var packages = packagesFileParser.GetPackages(project.GetPackagesFilePath()); var packagesText = new StringBuilder(packages.Count()); foreach (var package in packages) { packagesText.AppendLine($"<PackageReference Include=\"{package.name}\" Version=\"{package.version}\"/>"); } return(string.Format(netStandard20ProjFormat, packagesText)); }
void BackupOldFormatFiles(DotNetProject proj) { var backupFolderPath = $"{proj.BaseDirectory.FullPath.ParentDirectory}/mutatio_backup"; // Create backup directory FileService.CreateDirectory(backupFolderPath); // Backup current .xproj var projFilePath = proj.GetProjFilePath(); FileService.CopyFile(projFilePath, $"{backupFolderPath}/{proj.Name}.{proj.GetProjFileExtension()}"); // Backup packages.config var packagesConfigFilePath = proj.GetPackagesFilePath(); FileService.CopyFile(packagesConfigFilePath, $"{backupFolderPath}/packages.config"); // Backup AssemblyInfo.x FileService.CopyDirectory(proj.GetPropertiesDirPath(), $"{backupFolderPath}/Properties"); }