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

Cataster 641 Reputation points
2020-12-25T07:57:44.3+00:00

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:

51244-build-tasks-2.png

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

Accepted answer
  1. Anna Xiu-MSFT 27,891 Reputation points Microsoft Vendor
    2020-12-25T09:34:14.72+00:00

    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:
    https://developercommunity.visualstudio.com/spaces/21/index.html

    Sincerely,
    Anna

    • 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