The type or namespace 'SharePointOnlineCredentials' could not be found.

Ariel M 51 Reputation points

How do you resolve this error? I installed SharePoint.Client and SharePoint.Client.Runtime. I referenced Microsoft.SarePoint.Client in my app.

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,820 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,362 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 32,081 Reputation points Microsoft Vendor

    Hi @Ariel M
    Per my test, please check if you created .NET standard instead of .NET framework. If so you will need to recreate a .NET framework like following
    Then we can install CSOM by nuget package

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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

1 additional answer

Sort by: Most helpful
  1. Ariel M 51 Reputation points

    I added it but there's a yellow triangle with an exclamation mark in it on the reference.