Starting with version VS2015, there is no need for a NuGet folder, contrary to what I saw. In fact, the only file that is needed is the package configuration. There is a common, but very deceptive work for checking packages and their executable files, but which can create many problems in the future. I would not recommend this because he was hiding the problem, not solving it.
First, make sure your assembly is actually restoring packages. I noticed that in the error logs, this seems to be happening, but it's a trap. This is an attempt to restore, not actually success. If you encounter such a warning (and the same goes for nUnit, WebGrease, NewtonSoft, or any other package running NuGet):
Warning MSB3245: Failed to resolve this link. Could not find assembly "EntityFramework". Make sure the assembly exists on disk.
start by verifying that the logs contain the following passes:
PrepareForBuild:
Creating the directory "obj \ Debug".
...
RestorePackages:
"C: \ a \ src \ src.nuget \ nuget.exe" install "C: \ a \ src \ src \ xxxx.Entities \ packages.config"
-source -RequireConsent -o "C: \ a \ src \ src \ packages"
...
Successfully installed "EntityFramework 6.3.1". ResolveAssemblyReferences:
The main link is "EntityFramework".
Keep in mind that when you look at the log files, look for partial lines, since directories, versions, package names, etc. may vary slightly. If you cannot find it, there is a good chance that the packages will not be restored to the build server. Compiling locally proves that there is a difference between the environments, most likely the packages.config file is not available. This is a tricky mistake because failed logs will not tell you that it is missing. In fact, I did not mention it in magazines at all.
- First, I created a new Auto project and tested it. The assembly was successful.
- Then I added the Entity Framework and the build failed with the same warning as yours.
- Finally, I checked the package.config file. The assembly was successful.

The problem arises because the initial registration chooses the number of files to ignore. This is mainly bin, obj, etc., but also package.config. It must be specifically selected as not ignored. If someone checks in all files (not very wise, in my opinion), he also gets the file necessary, and therefore it seems that if they do it correctly. Note that you must first add the file to the version control. Thus, it is checked with every change. Otherwise, problems will reappear if you add a new package locally or upgrade an existing one.
If you get a warning, but the packages are restored (the logs have the specified lines), try updating the package locally or reinstalling it. Finally, you can update the installation from the package manager console by running Update-Package -Reinstall .
- A similar problem with the older version of the package manager is here .
- Wrong advice on files to check (starting with VS 2015) here .
- An outdated file layout description (valid for VS 2013 and earlier) is here .
- Read more about the structure of the NuGet file structure here .
- A very good blog on this issue (strange that this is not included in Google) is here .