When a package contains a props file that doesn't match the MSBuild required format, the MSBuild import will fail. NuGet will then attempt to roll the installation back, but the packages.config file is not updated (or deleted) to reflect the installation being rolled back.
Starting with a new project (Native Windows Store App), I tried creating the InvalidMSBuild package (attached) and got the following result:
Installing 'InvalidMSBuild 1.0.0'.
Successfully installed 'InvalidMSBuild 1.0.0'.
Adding 'InvalidMSBuild 1.0.0' to App2.
'packages.config' already exists. Skipping...
Uninstalling 'InvalidMSBuild 1.0.0'.
Successfully uninstalled 'InvalidMSBuild 1.0.0'.
Install failed. Rolling back...
The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. c:\Users\jeffhand\documents\visual studio 2012\Projects\App2\packages\InvalidMSBuild.1.0.0\build\native\InvalidMSBuild.props
After this, the packages.config file was left behind and the InvalidMSBuild package was still listed in there. However, the packages folder was removed.
Starting with a new project (Native Windows Store App), I tried creating the InvalidMSBuild package (attached) and got the following result:
Installing 'InvalidMSBuild 1.0.0'.
Successfully installed 'InvalidMSBuild 1.0.0'.
Adding 'InvalidMSBuild 1.0.0' to App2.
'packages.config' already exists. Skipping...
Uninstalling 'InvalidMSBuild 1.0.0'.
Successfully uninstalled 'InvalidMSBuild 1.0.0'.
Install failed. Rolling back...
The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. c:\Users\jeffhand\documents\visual studio 2012\Projects\App2\packages\InvalidMSBuild.1.0.0\build\native\InvalidMSBuild.props
After this, the packages.config file was left behind and the InvalidMSBuild package was still listed in there. However, the packages folder was removed.