Site Moving

Visual Studio 2015 RC NuGet Package Bug

UPDATE: NuGet Package Manager 3.1 has been released to Visual Studio Gallery. It resolves the issue mentioned here.

For those of you using the Visual Studio 2015 RC/RTM release you should be aware of a bug in the version of NuGet that ships with it. The bug manifests itself when building or debugging a project. When you first start VS the package is fine and you can go to Tools\Options\NuGet Package Manager and adjust settings. Clearly the package has been successfully loaded. But when you start to build the project (or start to debug which triggers a build check) then VS may report that the package failed to load.

The problem is that NuGet is attempting to update the nuget.config file to a new version and the file is read only causing the package to fail. The file can be read only for a number of reasons but the most likely case is when you are using source control (like TFS) and the file is checked in. The bug has been reported to NuGet and appears to be resolved in future versions. For now the workaround, if you encounter this issue, is to simply modify the nuget.config file to not be read only (or check the file out of source control) so that the update can succeed.