nuget 'packages' element is not declared warning

roundcrisis picture roundcrisis · Jul 21, 2011 · Viewed 105.8k times · Source

not a showstopper but when using nuget in a project, it creates a packages.config file with this shape

<?xml version="1.0" encoding="utf-8"?>
<packages>
   ... your packages
</packages> 

this gives a warning in VS

The 'packages' element is not declared.

The origin of the problem got something to do with the xml declaration I guess.

Also I think that the default definition package shouldn't throw warnings.

Does anyone know what should I change it to so I don't get this warning? (ie even if I can see it only when the file is open, it also shows as a warning constantly with certain CA rules on.)

Answer

Tzvi Gregory Kaidanov picture Tzvi Gregory Kaidanov · Aug 1, 2011

You will see it only when the file is open. When you'll close the file in Visual Studio the warnings goes away

http://nuget.codeplex.com/discussions/261638