Visual web part deployment error in SharePoint 2013 (enable features)

I am trying to deploy a simple web part in SharePoint 2013 using Visual Studio 2013 and I receive the following error:

An error occurred during the 'Activate Features' deployment phase: Feature ID '....' is not installed in this farm and cannot be added to this scope.

It took a long time trying to find a solution to this. Several blogs and forums talk about this and give different solutions (none worked for me).

The object scope is installed to the site, but the solution is not installed to the sandbox.

The deployment works if I choose the option to skip activation. But then when I go to site settings and go through the features, I can't find them. (I looked at both the site's capabilities and the site-building features).

I've tried changing the permissions in several different places. I made the user the owner of the site and also the site collection administrator (tried both primary and secondary), but it doesn't seem to have any effect.

I'm new to the entire complex world of SharePoint, so naked with no exact terms. Before moving on to solving this farm, I tried sandboxing and everything was fine: I was able to debug and deploy.

I know there is a way to deploy using PowerShell, but I don't think this is the perfect solution here.

Any suggestions? Thank!

+3


source to share


1 answer


if you miss the activation you have to deploy the script function.

Steps to deploy a web part

1 - in project settings go to sharepoint and select "No activation" for "Active deployment configuration"

2 - Deploy the project



3 - Run the below code in a management shell (run as administrator in a management shell)

 install-spfeature "yourProjectName_FeatureName"           /*exp: TEST.Webparts_Feature1*/

      

4 - Deactivate - activate fature in "Possibilities for creating sites"

0


source







All Articles