简体   繁体   中英

How do I remove NuGet “association” with the project in Visual Studio?

NuGet was used to manage packages for one of the class library projects in Visual Studio 2015. Now, NuGet is not needed to manage the packages for this project anymore and I also need to remove project.json file(as it became corrupt), but when I do that and try building the project, I get an error:

Error occurred while restoring NuGet packages: Could not find file 'D:\\Projects\\All\\TestProject\\project.json'

I did remove all packages in Manage NuGet Packages dialogue.

The project does build successfully but I keep getting an error in Visual Studio. 在此处输入图片说明

This project is not referencing any packages in NuGet so why would I need project.json file at all?

I want to "disassociate" this project with NuGet but do not know how. Any ideas?

I have restarted the Visual Studio and the error disappeared.

If it does not work for you, you might need to do the following:

  1. Open the solution containing the project.
  2. Go to Tools -> Options -> Source Control -> NuGet Package Manager -> General
  3. Deselect the Automatically check for missing packages during build in Visual Studio checkbox.
  4. Close the dialogue and restart the Visual Studio.
  5. Try building the project.

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