Forum Discussion
Arjun_Suda_S
Jul 24, 2019Copper Contributor
Creating an addin for sharepoint that uses c#
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: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-started-creating-sharepoint-hosted-sharepoint-add-ins
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.
- paulpaschaBronze ContributorYou 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.
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-started-creating-provider-hosted-sharepoint-add-ins