Hi @Kawtar ,
I'm glad to hear you solve the problem ,if you have any issue about SharePoint, you are welcome to raise a ticket in this forum.
By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others." and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:
[Getting Error occurred in deployment step 'Recycle IIS Application Pool': A task was canceled when deploying custom action to Sharepoint]
Issue Symptom:
We're currently trying to deploy a nintex custom action to Sharepoint 2019 using Visual Studio 2015 and .NET Framework 4.6
The issue is that it won't deploy, even though we succeeded in deploying the solution once
We've encountered the following errors in our attempts to fix it
Error occurred in deployment step 'Recycle IIS Application Pool': A task was canceled.
Error occurred in deployment step ‘Recycle IIS Application Pool’: The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm
We tried these solutions:
- VS opened as Administrator
- IISreset executed before every deploy
- Used account has full control and is the primary site collection administrator
- We tried restarting the server
Solutions:
The problem was fixed by clearing visual studio's cache.
You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks for your understanding!
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.