1

I'm getting this error when building a project​ using Visual Studio online service build:

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 ....\Attempt17\.nuget\NuGet.targets.

It is giving that nuget.target file is missing but it is already present in .nuget folder.

Any help?

1
  • @Dipali: please use only code ticks for words that are code, and not for anything else concerning software or code. Also, please do not randomly bold phrases (as you did in some of your other edits). They do not "improve formatting". Commented Dec 25, 2016 at 11:08

2 Answers 2

1

You should add a "Nuget Package Restore" task to your build before you run your compilation. You no longer need a ".nuget" folder.

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks will try this.
@neha Have you tried the "Nuget Package Restore" task? How's the result?
I tried it and issue got resolved. Thanks and sorry for late reply.
@neha can you share how you exactly achieved this? I'm on the same page here
0

I had a different cause, in VSTS/Azure DevOps using "Use Nuget" first then "NuGet restore" second, on Hosted agent...the restore was throwing this error. Error began showing sometime around Feb 1, 2019.

I had to change this...

Path to solution, packages.config, or project.json: **/*.sln

to this...

Path to solution, packages.config, or project.json: **\{YOUR_SOLUTION_NAME}.sln

And the error went away.

Hope this helps!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.