Forum Discussion
Unable to deploy WebPart to SharePoint SE from Visual Studio 2019 or 2022
Hi,
I am trying to deploy a project with Visual Studio 2019 or 2022 using Visual Webpart to Sharepoint SE and I get the message :
Error Error occurred in deployment step 'Recycle IIS Application Pool': A task was canceled.
To reproduce it, I create an empty SharePoint 2019 Project and I add a Visual Webpart (Farm Only).
When I deploy the project I get the error.
Everything is ok using SharePoint 2019.
Any idea about this ?
Thanks for your help
5 Replies
- Technical_PandaCopper Contributor
How To Do SharePoint Site's List Deployment Using C# API
https://technicalpandas.blogspot.com/2023/09/how-to-do-sharepoint-sites-list.html
Hi sbajda,
The error message "A task was canceled" usually indicates that the deployment process was interrupted or canceled by the user or by the system. There could be multiple reasons for this issue. I am listing few steps to resolve the issue:
-
Restart Visual Studio and try to deploy the project again.
-
Try to deploy the project on a different environment, such as a local development machine or a test server, to see if the issue is specific to the current environment.
-
Check the SharePoint logs for any errors related to the deployment process. The logs can be found in the SharePoint server's Event Viewer, or you can use the ULS Viewer to view the logs in a more readable format.
-
Make sure that the SharePoint server and IIS are configured correctly and that you have the necessary permissions to deploy the project.
-
If the issue persists, try to remove the Visual Webpart from the project and add it again. You can also try to create a new SharePoint project and add the Visual Webpart to it, and see if the issue is specific to the current project.
- sbajdaCopper Contributor
I have a new local installation of SharePoint SE with Windows Server 2019 and Visual Studio 2019.
All permissions are set in User Permissions for my Web Application in SharePoint.
I added IIS 6 WMI compatibility as I read in another thread.
Nothing in ULS Log
I have created a new simple project but my problem still persists
- rcheatham1890Copper Contributor
sbajda I'm have the same issue. When trying to deploy using a stand alone dev environment. I'm trying to deploy to a SharePoint hosted add-in. Any solution to this issue? Very frustrating
-