Пример #1
0
        async Task AddFileProjectItemToProject(string path)
        {
            ProjectFile fileItem = CreateFileProjectItem(path);

            project.AddFile(fileItem);
            await project.SaveAsync();
        }
Пример #2
0
        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());
 }