Creating an addin for sharepoint that uses c#

New Contributor

Hi Everyone,


I would like tp create an addin for Sharepoint online which uses  c# code and libraries. I am following the tutorial mentioned in:

I have deployed the addin created from default template in Visual Studio 2019, and now I wish to include and execute a C# file for generating an access token from this framework. 

I am confused how to call this file from .aspx page and make it work on the sharepoint addin page. Please help.

1 Reply
You won't be able to use C# inside of a SharePoint-hosted add-in. SharePoint supports 2 types of add-ins: "SharePoint-hosted" and "Provider-hosted". You need to create a Provider-hosted add-in to be able to use C# and libraries.