async Task AddFileProjectItemToProject(string path) { ProjectFile fileItem = CreateFileProjectItem(path); project.AddFile(fileItem); await project.SaveAsync(); }
async Task AddReferenceToProject(ProjectReference assemblyReference) { project.References.Add(assemblyReference); await project.SaveAsync(); LogAddedReferenceToProject(assemblyReference); }
public async Task ForceUninstall(string packageId, NuGetVersion packageVersion) { packageIdentity = new PackageIdentity(packageId, packageVersion); FilePath installPath = packagePathResolver.GetInstallPath(packageIdentity); RemoveReferences(installPath); using (var importRemover = new NuGetPackageForcedImportsRemover(installPath)) { await project.SaveAsync(); } }
public Task SaveProject() { return(project.SaveAsync()); }