Error occurred in deployment step 'Activate Features': Feature with Id [ID here] is not installed in this farm, and cannot be added to this scope.

回答済み Error occurred in deployment step 'Activate Features': Feature with Id [ID here] is not installed in this farm, and cannot be added to this scope.

  • 2011年1月31日 22:18
     
     

    I have SP Foundation 2010 and I have a custom web part created in VS 2010 and trying to deploy it. VS 2010 is installed on the server.

    When I deploy from VS I am getting this message: "Error occurred in deployment step 'Activate Features': Feature with Id '7d9879bc-86f3-4a98-be4f-106a752fc7d9' is not installed in this farm, and cannot be added to this scope" and the ID is that of my custom web part.

    I can see my custom web part in Central Admin --> Solution Management but it shows as "Not Deployed" and Deployed to shows "None."

    Here is what I have tried so far:

    1. Retracted and re-deployed it. It stops when it is trying to activate the feature.
    2. Checked credentials - I am logged into the server with a user who is a member of the local administrators group on the server.
    3. I created a test project as a sandbox solution and I was able to deploy with no errors.
    4. I manually deployed my farm solution from Solution Management in Central Admin and it worked.

    Why can't I deploy my farm solution from VS2010?

     


    Kristi Chilcote
    • 移動 Clayton Cobb - MVP 2011年2月1日 7:17 Yet another programming question in the General forum (From:SharePoint 2010 - General Questions and Answers)
    •  

すべての返信

  • 2011年2月1日 3:29
     
     
    Are you running VS 2010 on the SharePoint server itself or on a workstation?  You must be on the server itself for deployment to work using the automated deployment.
    Paul Stork SharePoint Server MVP
  • 2011年2月1日 7:16
     
     
    Please ask SharePoint 2010-related Visual Studio questions in the SharePoint 2010 Visual Studio forum.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
  • 2011年2月2日 19:05
     
     

    Thanks for your help on this. Sorry for posting to the wrong forum! I see now the forum it should be under. It looks like this question has been moved so rather than open a new one in the right forum, I will just keep going with this one unless you tell me otherwise.

    Yes, I have VS 2010 installed on the SharePoint 2010 server.

    After I got the error in VS I was able to manually deploy the feature from Central Admin -->Solution Management and then activate it from Site Settings -->Site Collection Administration -->Features

    Also, I believe my feature is configured in VS for "site" scope. I am not sure where to look in VS to find the configuration but here is my feature.xml that is located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\NewEmployeeToolSolution_Feature1\Feature.xml:

    <?xml version="1.0" encoding="utf-8" ?>
    - <Feature xmlns="http://schemas.microsoft.com/sharepoint/" Description="My Visual WebPart Feature" Id="7d9879bc-86f3-4a98-be4f-106a752fc7d9" Scope="Site" Title="NewEmployeeToolSolution Feature1">
    - <ElementManifests>
      <ElementManifest Location="VisualWebPart1\Elements.xml" />
      <ElementFile Location="VisualWebPart1\VisualWebPart1.webpart" />
      </ElementManifests>
    </Feature>


    Kristi Chilcote
  • 2012年5月10日 7:50
     
     回答済み
  • 2012年5月10日 11:42
     
     

    If you are running on the server then I've seen this in two other instances:

    1. If you are running on a SharePoint server that is part of a multiple server farm.  The Visual Studio project macros can only deploy to a single server in the farm, so if you have multiple servers you will see issues trying to use the deployment command inside Visual Studio.  Deploying the .WSP created by VS manually will work normally, its just the deployment mechanism inside VS that is a problem.
    2. If you aren't running as the Local Administrator user of the server you can have issues deploying from inside VS.  UAC can cause problems too.

    Paul Stork SharePoint Server
    MVP Senior Solutions Architect: BlueChip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.