Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I created a new feature in an existing big solution, I cant just redeploy the solution because it would break many things.

What I need is to update the solution and add the new feature, then activate that feature only.

I tried the following

Update-SPSolution –Identity XXXX.wsp –LiteralPath "D:\x.wsp" –GacDeployment
Install-SPFeature "ExternalCIRCASitesFeature"

The 1st command works, the second it doesnt. The solution compiled well, but the powershell gives me this erro

Install-SPFeature : Failed to find the XML file at location '14\Template\Features\ExternalCIRCASitesFeature\feature.xml'
At line:2 char:18
share|improve this question
    
Is the new feature present in the 14\Template\Features folder? –  Dribbel Feb 24 '12 at 16:02
    
does a file exist? –  Ashish Patel Feb 24 '12 at 16:02
    
Can you explain what would break? From what I've seen, nothing usually breaks in a normal deployment unless there is code in the Activate event that specifically deletes things... –  Dave Wise Feb 24 '12 at 16:33
    
I dont have a lot of experience in installing/un installing/deploying/upgrading... So I have one solution with Many features, the solution was already deployed on the server, I cant reinstall the solution with visual studio because it retracts And deploys again And it would break funcionality. So in the same solution I created another feature And I Want to install that feature only, thats why I upgraded the solution. What else I need to do.? –  L.V. Sharepoint Architect Feb 24 '12 at 17:57
add comment

2 Answers

up vote 1 down vote accepted

Feature upgrade does not work with new artifacts or deleted artifacts.

From TechNet:

The Update-SPSolution cmdlet upgrades a deployed SharePoint solution in the farm. Use this cmdlet only if a new solution contains the same set of files and features as the deployed solution. If files and features are different, the solution must be retracted and redeployed by using the Uninstall-SPSolution and Install-SPSolution cmdlets, respectively.

http://technet.microsoft.com/en-us/library/ff607724.aspx

You need to re-deploy your solution by retracting and reinstalling your solution.

Alternatively you can upgrade an existing feature to contain your new artifacts by using Feature Upgrade where you can add a new manifest to an existing feature and use either declarative upgrade logic or FeatureUpgrade receiver to call upgrade code.

What exactly are you adding? Depending on what you are trying to do in the "ExternalCIRCASitesFeature" feature, you could maybe use alternative methods like PowerShell to achieve the same result...

share|improve this answer
    
my new feature has new site columns, a new content type, a new list and a new list instance. But retracting the solution and deploying is not a solution for me. If I retract data from some lists will be lost. –  L.V. Sharepoint Architect Feb 25 '12 at 14:09
    
Well upgrading solution wont work either. That only works when no new artifacts are added. Site columns and content types can either be added programmatically in PowerShell (I never use features for that anymore) or if you use Content Type Hub you can manually insert fields and content types into your hub site. –  Anders Rask Feb 25 '12 at 17:01
add comment

I use this command:

stsadm -o installfeature -filename "[feature name]\feature.xml"

i think that you specified also the xml file :(

try

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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