Why “Could not locate the assembly ”System.IdentityModel.Services" on Ubuntu agent but not windows agent?

Cataster 641 Reputation points

Long story short, I was able to build a bitbucket .NET/MVC/Angular project successfully on windows 2019 azure hosted agent, as well as ubuntu agent. The reason I want to build it on ubuntu is because I noticed the build time is way faster than that of the windows agent, which makes sense considering the platforms.

I am facing this warning on Ubuntu 20 azure hosted agent:

warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.IdentityModel.Services". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.  

I dont get this warning on the windows 2019 agent, and i see there is a reference already included in the .csproj file:

<Reference Include="System.IdentityModel.Services" />  

and the following packages in packages.config file

  <package id="Microsoft.IdentityModel.JsonWebTokens" version="5.2.4" targetFramework="net471" />  
  <package id="Microsoft.IdentityModel.Logging" version="5.2.4" targetFramework="net471" />  
  <package id="Microsoft.IdentityModel.Protocols" version="5.2.4" targetFramework="net471" />  
  <package id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="5.2.4" targetFramework="net471" />  
  <package id="Microsoft.IdentityModel.Tokens" version="5.2.4" targetFramework="net471" />  

While the build is working just fine, Im curious to resolve this warning on Ubuntu agent, since its not showing up on windows 2019 agent.

screenshot of my build pipeline so far:


Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,141 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 27,226 Reputation points Microsoft Vendor

    Hi @Cataster ,

    Azure DevOps is currently not supported in the Microsoft Q&A, the supported products are listed over here https://learn.microsoft.com/en-us/answers/products (more to be added later on).

    You can ask in the dedicated Azure DevOps forum over here:


    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments

0 additional answers

Sort by: Most helpful