This issue comes into picture if you download NuGet powertools and enable package restore. On this action the NuGet command line tool is downloaded in a directory named as ".nuget" along with the NuGet target file. Further the .csproj or .vbproj file
is modified to import the NuGet target file and to add this property
Once you have enabled package restore do this
- Open up the .csproj file in notepad++ or any text editor that can detect changes in the file if carried out by an external program
- Disable package restore by firing "disable-packagerestore" from the VS Package Manager Console command line
- You will notice that the RestorePackages tag is now set as False.
- Close down Visual Studio and open it up again (You must close down VS and not simply the solution)
- Open up the same project/solution again. Check notepad++, the tag is still false.
- Open up the Package Manager Console. Don't do anything else.
- Check back notepad++, the tag is now flipped back to true.
Basically once you have enabled package restore, there is no going back. Every time you open up Package Manger Console, the RestorePackages tag is switched back to True.