Hot answers tagged

57

I have had this problem, too. The reason why they don't show up in PowerShell is the missing Scope, those feature are orphaned, indeed. We cannot use -Site parameter. What you can is to list it in PowerShell without -Site parameter and filter out those without Scope: Get-SPFeature | ? { $_.Scope -eq $null } This will give you a complete list of orphaned ...


55

For Features SharePoint Features can be scoped to the Farm, Web Application, Site Collection, and Web Site level depending on the purpose of the feature. The Feature scope is determined by the setting of the Scope attribute in the Feature element defined in the feature.xml file. A sample Feature element tag is given below: <Feature Id="F62C96CF-79FD-...


50

Welcome to SharePoint Stack Exchange! In your Visual Studio 2012 SP Solution: Enable Always Force Install to True in for your feature. See example below: By default, it is set to False. You can configure that to be set to True.


47

If you double-click on the feature (NameofFeature.feature), in your solution. You'll see a properties window come up - as a window that details the title, description, scope, items in solutions, and items in the feature. In the properties window, you'll see an option titled 'Always Force Install'. By default, it is set to False. You can configure that to be ...


41

Feature stapling is a technique that allows for a feature to be stapled to a site definition by using a support "stapler" feature that defines which features are attached to which site definition. This allows for a feature to be automatically activated on a site created from a site definition without the need to modify the definition files (onet.xml). This ...


16

You can't deploy a Web Part at the Scope = Web level. Web Parts must be deployed at the Site level since the .dwp or .webpart file needs to be deployed to the Web Part gallery, which is at the Site Collection level.


15

One of the problems with content types (there are quite a few!) is that the design with site and list content types works very poorly with the declarative (XML) approach. If you just update your Content Type manifest and re-install the feature new content types will be affected, but not all the list content types already "instantiated" from the site content ...


13

If you want to create a folder, you have to specify its name in the leafName parameter. change your code to : foreach (SPListItem reparto in reparti.Items) { var folder = dl.Items.Add( dl.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder, "Test" ); folder.Update(); } If it can help, here a ...


13

You can do it via the XML editor as well! Steps: Go to your Features in your project. Open the feature.template.xml file add AlwaysForceInstall="TRUE" to the below tag <Feature xmlns="http://schemas.microsoft.com/sharepoint/" AlwaysForceInstall="TRUE"> Now try to deploy the code.


13

This error happens if you deploy a solution which contains a visual web part to a different web application on the same farm as the web application where it is already installed. In other words, you have two web applications, A and B on the same SharePoint farm. You want to deploy solution S which contains a visual web part to web application B, but it is ...


11

From the point of view of an experienced developer there is no major difference but there are points to consider. Code approach: More friendly for new developers, cause VS environment provides good features for investigating new API You can debug it step by step, comment and use Watch tools, in comparison with XML where you just see the result Before XML ...


11

Elements by Scope helps you understand what elements are allowed for each scope. That also means that solutions can be developed and SharePoint architecture allows them to be deployed at any of the scope documented. Most solutions use FEATURES that are targeted at web or site collection level and when an element is allowed at both web and site level, it ...


11

It's always difficult to properly hide / remove the title field, anyway if it's a content type inheriting from Item (which I bet it is based on its ID inheriting from 0x01) you can safely do the following : Set inherits to FALSE, and rely on the RemoveFieldRef to remove the title field. You won't need to re-enter its definition within the Fields node. Here ...


10

This might end up as a 'whatever floats your boat' kinda question. I will add though, that whatever you choose, make sure it's consistent throughout the entire solution. Remember that creating Content Types programmatically is done at Feature Activated level, which is after Feature XML is processed, so if you're provisioning Page Layouts, you'll need to ...


9

As far as I know, the only way to upgrade a feature is by calling the Upgrade() method. Any other operation, including deactivation/reactivation, solution upgrade/update etc should in no way force a feature upgrade. I have upgraded some feature after a solution update in the past and they were NOT automatically upgraded by the Update-SpSolution cmdlet (I had ...


9

Please visit this blog from Joel Oleson where he describes about SharePoint 15 and Office 15 Wave of Products !!! You can also check out for the Technical Preview Program from Office


9

Check that the feature has been installed. For example, if you are performing Update-SPSolution and a new feature has been added between solution deployments then the feature is not installed by default. To check do the following:- Run SharePoint 2010 Management Shell from one of the SharePoint servers Type Install-SPFeature -ScanForFeatures This will ...


8

If you're creating a custom list that means you have files like this: feature.xml (to be put inside a subfolder of 12Hive\TEMPLATE\FEATURES) elements.xml (to be put in same folder) schema.xml (to be put in the subfolder of the above defined by Name in ListTemplate) Your manifest.xml will be something like: <?xml version="1.0"?> <Solution ...


8

Usually this happens if you have feature activated event receiver and use http context in code somehow (accessing to SPContext.Current or creating web part, that might use internally Http context). When you activate your feature through UI, Http context is not null and all may work as expected, but when activating through PS or stsadm Http context is null ...


8

within your solution click on feature.feature and goto its properties, you should now see somthing on the lines of Always Force Install just set that to true and you dont need to do the force attribute anymore! looks like a feature wasnt retracted properly and has become a phantom! ybs has a similar issue here! Visual studio Both site collections ...


8

Solution id is identity of Solution package (.wsp file). If you are deploying wsp file, it will check solution id. If exists, it will update solution. Solution contains all the features, assembly, resources, etc. One .wsp package can contain multiple features Feature id is identity of particular single feature which is web/site/web application/farm scoped ...


7

You could do this through PowerShell. I used this script as a basis and created the following script to list all webparts of all pages in all webs in a site collection. Take a look: # Basis: http://www.glynblogs.com/2011/07/listing-all-web-parts-in-a-site-collection-with-powershell.html # Modified by http://sharepoint.stackexchange.com/users/2509/tarjeieo ...


7

To my surprise this worked for me: stsadm -o uninstallfeature -id <id-of-feature-missing> -force Found in this blog post Sharing Minds - by Anthony Butcher


7

Is your production a multi server farm? I think you are facing the following issue: http://blogs.msdn.com/b/calvarro/archive/2011/11/06/sharepoint-2010-amp-visual-studio-2010-error-ocurred-activate-features-feature-with-id-installed-in-this-farm-cannot-be-added-to-this-scope.aspx It turns out that VS 2010 internally implements a call to the method ...


7

Your plan is good, and respects good practices (at least the practices I've been following for ages). Your approach is to: Create the solution in VS Create one feature (scope: Web) Create two classes for the event receivers (both inheriting from SPItemEventReceiver) Add a feature event receiver on the feature (inheriting from SPFeatureReceiver) In the ...


6

You can try tu use SharePoint Manager 2010 or SharePoint Feature Administration and Clean Up Tool


6

Process of changing feature scope from old one (e.g. Web) to a different one (e.g. Site) involves several steps Deactivate feature with old scope wherever it's been used throughout the whole farm Uninstall feature with old scope Install feature with new scope Activate feature with new scope Without aforementioned procedure, installing feature with the ...


6

A better way to solve this without adding force is after the error happens, just leave the wsp there with the error in CA, open the SharePoint Management Shell and use the update-SPSolution command with the path of the wsp file you just added to deploy, it should also deploy itself after the update. Update-SPSolution -Identity "name wsp" -LiteralPath "path ...


6

No, the solution dictates if it's global or per web application. WebApp Scope If the solution contains resources that's web application specific like: - Dll deployed to bin - Dll with SafeControls - files to the other hostdir folders then the solution must be installed to specific web application(s) by either specifying web applications like: Install-...


6

This webpart requires Enterprise features to be enabled in your environment. If this is not enabled the webpart will not be available. Here's a guide on how to do that If you still have problems after that check this link for another possible cause


Only top voted, non community-wiki answers of a minimum length are eligible