VisualStudio.com (Visual Studio Team Services) builds failure on nuget package dependencies

Thought I'd try to get the most out of my visualstudio.com membership. I created a solution with several projects, pushed it to the Microsoft git source code provider, set up the build definition and tried to create it on the project server. However, he does not allow me to say:

The type or namespace name "Moq" could not be found (are you missing the using directive or assembly reference?)

I know this means that the build server cannot find the Moq.dll library. I installed it using NuGet but configured my .gitignore to keep the package folder out of source control. I also turned on NuGet package recovery for the solution and clicked nuget.exe, nuget.targets and nuget.config (all 3 files in the .nuget folder) along with all other project files.

Now I’m sure that I can make the assembly work if I push the package folder too, but I want the nuget package folder to be out of source control. . So I wonder is this possible? Visualstudio.com docs say that Visual Studio 2013 is installed on the build servers, and because of this, I assume that restoring the nuget package will work to load the missing dll so that they can be resolved by MSBuild. It is right? Or use automatic CI builds on visualstudio.com, do you need your packages to be under source control?

According to the log file, nuget package recovery downloads the package. What gives?

"C:\a\src\MySln.sln" (1) "C:\A\\ \MySln.ProjA.UnitTests\MySln.ProjA.UnitTests.csproj" (3) node 1 ( ). RestorePackages:
"C:\a\src.nuget\NuGet.exe" "C:\a\src\Tests\MySln.ProjA.UnitTests\packages.config" -source "-NonInteractive -RequireConsent -solutionDir" C:\a\src \ " NuGet... NuGet build, " Visual Studio ", " "Manager node " NuGet ".
, packages.config, . PrepareForBuild: " obj\Debug \". ResolveAssemblyReferences: "Moq". C:\Program Files (X86)\MSBuild\12.0\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1635,5): MSB3245: . "". , . , . [C:\A\\ \MySln.ProjA.UnitTests\MySln.ProjA.UnitTests.csproj]

:

"..\packages\Moq.4.1.1311.0615\lib\net40\Moq.dll", .

+4
2

. , nuget, Tests. - LM, , , bin/Debug. nuget vs .com.

+2

, . Moq NuGet, , . TFS, Moq. . , , , . , , Moq. TFS/ - Visual Studio .

+3

All Articles