-1

A previously working on-premises TFS 2015 (with update 1) fails all builds that have nuget packages in them. The build log shows:

MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
Restoring NuGet package StyleCop.Error.MSBuild.1.0.0.
Restoring NuGet package Microsoft.Diagnostics.Tracing.EventSource.Redist.1.1.28.
Restoring NuGet package Microsoft.Diagnostics.Tracing.EventRegister.1.1.28.
Restoring NuGet package Microsoft.Diagnostics.Tracing.EventSource.1.1.28.
Restoring NuGet package StyleCop.MSBuild.4.7.50.
Restoring NuGet package Newtonsoft.Json.8.0.3.
Restoring NuGet package Dapper.1.42.0.
Restoring NuGet package FluentAssertions.4.2.2.
WARNUNG: Unable to find version '1.1.28' of package 'Microsoft.Diagnostics.Tracing.EventRegister'.
WARNUNG: Unable to find version '1.0.0' of package 'StyleCop.Error.MSBuild'.
WARNUNG: Unable to find version '1.1.28' of package 'Microsoft.Diagnostics.Tracing.EventSource.Redist'.
WARNUNG: Unable to find version '1.1.28' of package 'Microsoft.Diagnostics.Tracing.EventSource'.
WARNUNG: Unable to find version '1.42.0' of package 'Dapper'.
WARNUNG: Unable to find version '8.0.3' of package 'Newtonsoft.Json'.
WARNUNG: Unable to find version '4.7.50' of package 'StyleCop.MSBuild'.
WARNUNG: Unable to find version '4.2.2' of package 'FluentAssertions'.
Unable to find version '4.2.2' of package 'FluentAssertions'.
Unable to find version '4.7.50' of package 'StyleCop.MSBuild'.
Unable to find version '1.1.28' of package 'Microsoft.Diagnostics.Tracing.EventRegister'.
Unable to find version '8.0.3' of package 'Newtonsoft.Json'.
Unable to find version '1.42.0' of package 'Dapper'.
Unable to find version '1.1.28' of package 'Microsoft.Diagnostics.Tracing.EventSource'.
Unable to find version '1.1.28' of package 'Microsoft.Diagnostics.Tracing.EventSource.Redist'.
Unable to find version '1.0.0' of package 'StyleCop.Error.MSBuild'.
Unerwarteter Exitcode 1 vom Tool NuGet.exe zurückgegeben

On dev PCs the solutions build just fine and nuget packages are restored without problems.

How to fix this?

Pompair
  • 7,083
  • 11
  • 60
  • 69
  • Which build system are you using, vNext or XAML? Can you share the whole logs? And also check if someone added the packages into Source Control. If yes, delete the packages folder and then try again. – Eddie Chen - MSFT Mar 17 '16 at 06:17
  • We use the default build system in TFS. The nuget packages are definitely not committed in git repository. – Pompair Mar 17 '16 at 09:31

1 Answers1

0

The error message indicates that the packages cannot be found in your package resource. Since the packages can be restored on you dev PC, you can compare the nuget.config file on your TFS server and dev PCs to see if there is any difference between them. The nuget.config file locates at "%APPDATA%\NuGet\NuGet.Config".

And the nuget.exe version you use may also cause this issue, see this question for reference: "Unable to find version" during TFS Build 2015 when restoring NuGet packages

Community
  • 1
  • 1
Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60