Hi @shivpratap-3010 ,
If you are managing a non-developer site collection, you need to enable the app SideLoading feature.
Visual Studio calls the Microsoft.SharePoint.Client.AppCatalog.IsAppSideloadingEnabled method for the given site collection URL, which returns true if the site is a developer site or if the site has the sideloading feature enabled. For a Site Collection to work which is not a developer site, the sideloading feature must be enabled.
Enabling app sideloading requires tenant admin permissions (in a multi-tenant environment) or farm admin permissions (in a single tenant environment). When you begin development in Visual Studio against any of the site URLs above without these permissions, the error "Sideloading of apps is not enabled on this site" will appear and the app installation will fail. Please make sure the permission is tenant admin first.
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.