3

I am getting the below mentioned error when deploying my workflow project.

Error 1 Error occurred in deployment step 'Activate Features': Feature with Id 'bfb411c4-b0f9-4ebd-9707-0c31ebd98553' is not installed in this farm, and cannot be added to this scope.

Did a complete solution search on the GUID show in the error found a .feature file with the following xml.

<?xml version="1.0" encoding="utf-8"?>
<feature xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" dslVersion="1.0.0.0" Id="bfb411c4-b0f9-4ebd-9707-0c31ebd98553" featureId="bfb411c4-b0f9-4ebd-9707-0c31ebd98553" imageUrl="" solutionId="00000000-0000-0000-0000-000000000000" title="HRLeaveApplicationWorkflow Feature2 Version 0.0.1.3 " version="" deploymentPath="$SharePoint.Project.FileNameWithoutExtension$_$SharePoint.Feature.FileNameWithoutExtension$" isDesignerEnabled="false" xmlns="http://schemas.microsoft.com/VisualStudio/2008/SharePointTools/FeatureModel">
  <projectItems>
    <projectItemReference itemId="7ab2493e-ea06-48b1-a3ab-2cefd0a2b133" />
    <projectItemReference itemId="87780597-9c40-4a2f-926b-97fce5632eed" />
    <projectItemReference itemId="43e518c7-831f-4a7f-93c0-93541dded56f" />
    <projectItemReference itemId="4050173a-b506-4b68-a561-60474cc3c335" />
    <projectItemReference itemId="a9beb338-0bbd-47f1-9231-e8bee3119d4f" />
    <projectItemReference itemId="e1dae3fa-9872-4fb5-83f4-b243f424b291" />
    <projectItemReference itemId="aecc3d28-66e5-4260-ad8d-bf9c95391987" />
    <projectItemReference itemId="e9275b7c-1a5e-4248-90be-f756cf226911" />
    <projectItemReference itemId="f1eb141d-d988-46e8-9354-6c508d1b60b5" />
    <projectItemReference itemId="1ba830e8-0156-4b19-8a41-3102da62b837" />
    <projectItemReference itemId="c610baac-8c6d-42a4-8b40-7834eae38ee7" />
    <projectItemReference itemId="837735f7-a8d7-41b5-be95-47c5cad52e65" />
    <projectItemReference itemId="8fee65f9-15f4-4009-a3b3-86e473b38e3e" />
    <projectItemReference itemId="7c065181-cfa6-4267-8306-a30095e11cd2" />
    <projectItemReference itemId="dbc64e31-5fff-4336-8377-12272ce0363b" />
    <projectItemReference itemId="863cace3-a706-4516-a310-075305459cfb" />
  </projectItems>
</feature>

Removed the solution totally from my server (Dev Server). Still this error keeps on repeating.

What am I missing here?

  • some questions: 1- how you are deploying the workflow project? 2-what solution you removed? It is the same one or a different one? 3-the error keeps on repeating: when? You mean that after removing the solution the deploy of the other one still fails? – SPArchaeologist-様 Mar 20 '16 at 13:31
  • 1 - Visual studio deployment 2 - WSP solution that has the workflow features. Same solution. 3 - Everytime I deploy the solution. Yes. – Muhammedh Mar 20 '16 at 13:45
  • Ok. Is that the only feature in the solution? It seem like Visual studio is trying to activate the feature after the deployment step, and something is keeping it from doing that. Some checks that I would perform: first, ensure that there isn't some code lingering around that is trying to programmatically activate the feature. Second, try to install the wsp manually from powershell and confirm that you get the same error. Third, check the deployment configuration in Visual studio (if the feature has just been added and you are using Upgrade mode, you should get the error you are experiencing). – SPArchaeologist-様 Mar 20 '16 at 14:02
  • manually deployed the wsp solution and activated both the features. all went smooth. Now i am going to deploy via visual studio again. – Muhammedh Mar 21 '16 at 6:55
  • @SPArchaeologist Tried deployment via Visual studio after rebooting the server. Same error – Muhammedh Mar 21 '16 at 7:34
2

The solution I came up with is a temporary fix. I created a shell script to retract, remove and redeploy the solution.

So at first I would have a dedicated location to publish my .wsp file than a script using the new .wsp.

Script is given below:

$webApplicationUrl = "http://my-dev/"
$siteUrl = "http://my-dev/site1"
$solutionName = "hrleaveapplicationworkflow.wsp"

$workflowSolution = Get-SPSolution -Identity $solutionName

if($workflowSolution)
{


    echo "Deactivating Feature 2"
    Disable-SPFeature -identity "HRLeaveApplicationWorkflow_Feature2_Version0.0.1.3" -URL $siteUrl -Confirm:$false
    iisreset

    echo "Deactivating Feature 1"
    Disable-SPFeature -identity "HRLeaveApplicationWorkflow_Feature1_Version0.0.1.3" -URL $siteUrl -Confirm:$false
    iisreset

    $sln = Uninstall-SPSolution -Identity $solutionName -WebApplication $webApplicationUrl -Confirm:$false

    echo "Started solution retraction..." 
    start-sleep -s 30 

    $sln = Remove-SPSolution -Identity $solutionName -Confirm:$false

    echo "Started solution removal..." 
    while($sln.JobExists) 
    { 
        echo " > Remove in progress..."
    }

    echo "Started Add Solution..."
    Add-SPSolution -LiteralPath "D:\DeployHRLeaveApplicationWF\HRLeaveApplicationWorkflow.wsp" -Confirm:$false

    echo "Started Install Solution..."
    Install-SPSolution -Identity $solutionName -WebApplication $webApplicationUrl -GACDeployment

    iisreset

    echo "Activating Feature 2"
    Enable-SPFeature -identity "HRLeaveApplicationWorkflow_Feature2_Version0.0.1.3" -URL $siteUrl
    iisreset

    echo "Activating Feature 1"
    Enable-SPFeature -identity "HRLeaveApplicationWorkflow_Feature1_Version0.0.1.3" -URL $siteUrl
    iisreset



}
else
{
    Write-Host "Solution not found!"
}

Hope this was helpful for someone :)! Cheers and have a good one fellas :)!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.