In my case.I was getting missing element error pointing to NuGet.Config
file.
At that time it was looking some thing like this
<?xml version="1.0" encoding="utf-8"?>
<settings>
<repositoryPath>Packages</repositoryPath>
</settings>
then I just added configuration
tag that actually wraps entire xml. Now working fine for me
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<settings>
<repositoryPath>Packages</repositoryPath>
</settings>
</configuration>