Forum Discussion

ChuckW960's avatar
ChuckW960
Copper Contributor
Feb 24, 2020
Solved

Unable to deploy Provider-Hosted Add-Ins in VS - SharePoint Ok?

Hello,

I've now tried on two machines. When I try to debug/deploy Provider-Hosted Add-Ins in Visual Studio, I'm getting an error here: :

2> Install SharePoint Add-in:
2> Uploading the SharePoint Add-in...
2>Error occurred in deployment step 'Install SharePoint Add-in': Operation is not valid due to the current state of the object.

 

I've tried this on two machines, and have also now created a new dev site and tried creating a new blank Add-In in Visual Studio, getting the same result. Has anyone else seen this?

  • My teammate let me know she was able to do this last night, and today when I tried again I was able to do it. Would love to know what "object" was in an "invalid state" - my user account, the tenant, the site, the code, my machine, my VS settings, etc. Oh well. I just seem to have been in some sort of penalty box for 48 hours.

9 Replies

  • ChuckW960's avatar
    ChuckW960
    Copper Contributor

    My teammate let me know she was able to do this last night, and today when I tried again I was able to do it. Would love to know what "object" was in an "invalid state" - my user account, the tenant, the site, the code, my machine, my VS settings, etc. Oh well. I just seem to have been in some sort of penalty box for 48 hours.

  • orchee's avatar
    orchee
    Iron Contributor

    ChuckW960 You can download demo solution from MS and check if you can deploy it and run it. It may help you to track down what is your specific issue.
    https://github.com/OfficeDev/SharePoint_Provider-hosted_Add-ins_Tutorials/tree/master/1_BeforeSharePointUI

    • ChuckW960's avatar
      ChuckW960
      Copper Contributor

      orchee Thank you. I have now tried that, and am getting the same error. Is it possible there's an issue with my tenant?

      • orchee's avatar
        orchee
        Iron Contributor

        ChuckW960 Have you configured App Catalog in CA and have you chosen Developer Site to deploy in VS?

Resources