doorman
doorman

Reputation: 16959

TFS2018 Nuget not restoring in referenced projects

I am using TFS2018 and I am building a solution which is using a reference to another project. This project is using a Nuget which is not located on the machine. I have two Nuget steps defined before the build step. Use Nuget and Nuget Restore. I would assume Nuget Restore will handle restoring Nugets in referenced projects?

I am getting the following error during the build step:

> 2017-12-11T18:13:34.4411552Z ##[debug]Processed: ##vso[task.logdetail
> id=b053619e-0646-45e5-8778-efc3bdd6c71a;parentid=567e2a52-8416-481f-9c9c-4bf1c4c56077;name=MYBLLProject.csproj;type=Build;starttime=2017-12-11T18:13:34.4384956Z;state=InProgress;]
> 2017-12-11T18:13:34.4527426Z
> ##[error]MYBLLFolder\MYBLLProject.csproj(79,5): Error : This project references NuGet package(s) that are missing on this
> computer. Enable NuGet Package Restore to download them.  For more
> information, see http://go.microsoft.com/fwlink/?LinkID=322105. The
> missing file is
> C:\a\w\11\s\MyProject\\.nuget\NuGet.targets.
> 2017-12-11T18:13:34.4528532Z ##[debug]Processed: ##vso[task.logissue
> type=Error;sourcepath=C:\a\w\11\s\MYBLLProject\MYBLLProject.csproj;linenumber=79;columnnumber=5;code=;]This
> project references NuGet package(s) that are missing on this computer.
> Enable NuGet Package Restore to download them.

Upvotes: 0

Views: 55

Answers (1)

user5293664
user5293664

Reputation:

Nuget Restore will only work if you are pointing to a valid resource location. In this case it appears you are pointing to a resource that it is expecting to be on the local machine. You will need to find a Nuget repo that has the Nuget package you are looking for, or put it out on your own Nuget repo.

Upvotes: 1

Related Questions