The Visual Studio item is not declared.

So, in Visual Studio 2017, I received the following warning in the package.config file that was automatically generated:

The 'packages' element is not declared.

This is the same problem as here: The 'packages' element is not declared

And here: the nuget 'packages element is not declared a warning

The consensus seems to be that this warning can be safely ignored. Moreover, some of the comments suggest that attempts to fix this can cause other problems and / or be difficult to maintain.

For example, one participant said:

None of the answers will solve your problem forever. If you go to the path of adding XSD (from the Xml menu, select "Create Schema"), you will have problems with the package manager, since it will clear your package.config file when adding a new package.

However, the last contributor suggested simply changing <packages>to <packages xmlns="urn:packages">. This leads to the fact that the error disappears, and I did not see the usual problem (my experience here is very limited).

However, I do not want to risk causing Nuget problems over a warning that does not need to be addressed. On the other hand, every project created in VS, I suppose, will have this error by default, so it would be easy, easy, and easy to repair the patch.

, : <packages> <packages xmlns="urn:packages"> packages.config, - ?

+4
2

<packages> <packages xmlns="urn:packages"> packages.config, - ?

<packages xmlns="urn:packages"> packages.config . xmlns (namespace) - , (URI), . package.config NuGet. Microsoft <packages xmlns="urn:packages"> <packages">.

packages.config , NuGet, , package.config, .

+8

EntityFramework.SqlServer... 100% , .

-1

Source: https://habr.com/ru/post/1673826/


All Articles