简体   繁体   中英

Unable to install Nuget Microsoft.AspNet.Web.Optimization, +1 other package

I am trying to install this package (version 1.1.3), receiving this error:

The change on C:\\Projects\\Software License Management\\Main\\SoftwareLicenseManagement\\packages\\Microsoft.AspNet.Web.Optimization.1.1.3\\Microsoft.AspNet.Web.Optimization.1.1.3.nupkg cannot be undone because a file already exists at C:\\Projects\\Software License Management\\Main\\SoftwareLicenseManagement\\packages\\Microsoft.AspNet.Web.Optimization.1.1.3\\Microsoft.AspNet.Web.Optimization.1.1.3.nupkg. The file must be deleted from disk for the undo to succeed.

However, this is after I have removed the file specified. Visual Studio then prompts me to restart VS in order to finish removing it. Rinse and repeats and does not work.

This also happens with Microsoft.Web.Infrastructure 1.0.0.

I've tried using Nugets command line uninstall/reinstall method and still not being removed.

I will suppose you're using TFS because of this line: The file must be deleted from disk for the undo to succeed. . This "bug" can happen when you have a pending change on a Nuget package file and didn't commit yet.

Try committing your work (if possible). Doing a rollback on the package files instead of committing might also work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM