简体   繁体   中英

Visual Studio Team Services: Build Error (Assembly reference cannot be resolved)

I'm trying to build a project on Visual Studio Team Services that builds just fine locally, and get the following exceptions:

Code Analysis detected errors.  See Code Analysis results window or log file for details.
CA0001 : The following error was encountered while reading module 'Acme.Web': Assembly reference cannot be resolved: Microsoft.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
CA0058 : The referenced assembly 'Microsoft.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be found. This assembly is required for analysis and was referenced by: C:\a\bin\Acme.Web.dll.

I looked through all .csproj files and NuGet packages files manually and fail to find any reference to Microsoft.Owin (2.0.0.0) - all projects seem to reference the correct assembly 2.1.0.0.

Does anyone have a hint where I could continue searching or has anybody experienced a similar issue with VS Team Services CI?

Did you restore Nuget Packages before trying to build? If you are using Visual Studio Build task (or MSBuild ), you can check the option "Restore Nuget Packages"

The prefered option is to add a Nuget Restore task before your build task. Simply point to your Sln (***.sln) and it will do the job.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM