0

enter image description hereenter image description hereWe have recently decided to Implement CICD in the project ,using Azure Dev ops. We use TFS for the code check in and have the code repository in Azure Dev Ops. Attaching the configurations we made for the project in Dev Ops pipeline.Error during build

Tried using Nuget restore as well. Still the same issue!

2
  • why you use command line instead of native nuget task? what is the output of the command line task? Commented Jun 1, 2020 at 8:08
  • 2020-05-29T15:17:40.6458531Z ##[command]"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "F:\Build\Agent3_work_temp\76cd57c5-84af-4101-9ed0-d58542b964a3.cmd"" 2020-05-29T15:17:40.6622697Z Write your commands here 2020-05-29T15:17:42.5026573Z MSBuild auto-detection: using msbuild version '16.4.0.56107' from 'E:\Programs\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\bin'. 2020-05-29T15:17:44.6121149Z All packages listed in packages.config are already installed. Commented Jun 1, 2020 at 8:27

2 Answers 2

1

Open your project in Visual Studio locally, delete all packages or packages.config file. Then right click the solution/project, select manage nuget packagesand install the packages. Now you should see the packages.config file generated. Build the project locally to see whether it is successful. If the build is successful, check in the project (don't check in the packages) with packages.config file to DevOps, and use Nuget restore and Visual Studio Build tasks to build your project.

In addition, it seems you are using a self-hosted agent. Try to go to your agent machine, clean the folder F:\Build\Agent3\_work, and check build agent to make sure you are using the latest version.

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

Comments

0

In your logs I can see you target an older version of nuget.org

https://api.nuget.org/v2

you should go instead to

https://api.nuget.org/v3/index.json

But there is no need to use command line to restore your nugets, you can use the restore task instead.

Do not forget to add any private nuget feeds if you have one.

3 Comments

Thanks @Stelios Giakoumidis. I have also tried Nuget restore option, still I got the same errors.
@Fayazshaik do you have any private nuget server?
No we don't have a private nuget server.

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.