TeamCity with NuGet, missing links

I try to have my TeamCity server build packages from NuGet, so I don’t need to include all the assemblies in my repositories.

Initially, everything works, but when the MSBuild step starts, the required assemblies / packages are not found anywhere.

I added my packages folder to my repository, and I tried to include my project in "Enable NuGet Package Recovery", as indicated here:

http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages

Nothing works. When I look at the packages folder in the working directory (), it is empty, so the packages were not compiled?

Here is the log from nuget tasks:

[09:11:44][Step 1/2] install: Installing NuGet packages for ApplicationBoilerplate\packages.config [09:11:44][install] NuGet command: C:\TeamCity\buildAgent\tools\NuGet.CommandLine.2.0.0.nupkg\tools\NuGet.exe install C:\TeamCity\buildAgent\work\76a8f67cab97e73b\ApplicationBoilerplate\packages.config -OutputDirectory C:\TeamCity\buildAgent\work\76a8f67cab97e73b\packages [09:11:44][install] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script862718012095619696.cmd [09:11:44][install] in directory: C:\TeamCity\buildAgent\work\76a8f67cab97e73b\ApplicationBoilerplate [09:11:45][install] Process exited with code 0 

If the packages folder remains empty (some kind of temporary storage?) Or should it contain downloaded packages?

+6
source share
1 answer

As with NuGet 2.0, you need to do more than described on the documentation page. Here is a blog about change .

I wrote a message about enabling package recovery using an environment variable: Enable NuGet PackageRestore on CC.NET

Rob Reynolds created the NuGet package, which should automatically fix this, but I have not tried it yet.

NuGet Enable packet recovery (for real) 2.0.0

If your TeamCity server does not have Internet access, you may also have a problem:

NuGet Package Recovery Assumes Internet Access

+4
source

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


All Articles