Fylix
Fylix

Reputation: 2713

Build agent not able to see NuGet package on Visual Studio Team Service

I'm using the Visual Studio Team Service online Ci/CD process to automate our build. This has been working until we have a project that utilizes .NET core and the Microsoft.AspNetCore.Cryptograhpy package in our project. We also upgraded the IDE to VS 2017.

Below is the error on the build agent:

enter image description here

Things that I've tried:

  1. I've verified I have the NuGet Restore step in my build definition prior to building my project and in its log I see that it downloads this package.

2018-06-29T13:51:48.4627803Z Checking compatibility for Microsoft.AspNetCore.Cryptography.Internal 2.0.3 with .NETFramework,Version=v4.6.1 (win-x86). 2018-06-29T13:51:48.4628026Z All packages and projects are compatible with .NETFramework,Version=v4.6.1 (win-x86). 2018-06-29T13:51:48.4628199Z Committing restore...

  1. I verified that my build machine has this package installed.

enter image description here

  1. I can build my project without any error via my local Visual Studio 2017 on this machine where my build agent runs as a service.

  2. My agent runs as a service using the account that has administrator right.

  3. I updated our .NET Core runtime to 2.1.

  4. We are using the default setting that comes with the NuGet, pls note this has working up until recently.

enter image description here

Can anyone give me a hint on this? could this be some sort of environment parameter or permission issue or something else at play?

I also look at the project file .csproj of the solution that caused this error or the solution that needs this package and here is its definition:

enter image description here

Upvotes: 1

Views: 992

Answers (1)

Fylix
Fylix

Reputation: 2713

I have yet to see why I did below fix the issue but I post it anyway; If I find the real reason then I'll update my answer.

I manage to get this to compile after I went into my Build definition at the Build Visual Studio task and go into the Advanced -> MSBuild Architecture and changed it from MSBuild x86 to MSBuild x64.

enter image description here

Upvotes: 1

Related Questions