Hot answers tagged

58

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-...


51

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.


48

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 ...


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

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

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 ...


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


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

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

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-...


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

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

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


5

The following link describes sharepoint 2010 project structure (VS project structure) http://bitofthought.blogspot.in/2012/05/visual-studio-sharepoint-solution.html


5

please dont just delete the files ;) , use powershell to deactivate the feature and the unistall it :). If you start deleting folder it could break sharepoint. http://msdn.microsoft.com/en-us/library/ms442691.aspx how have you been upgrading your feature? like so? Update-SPSolution –Identity YourSolutionName.wsp –LiteralPath “C:\YourSolutionName.wsp” –...


5

You should have Type="GhostableInLibrary" attribute for your preview. I suppose MasterPages in your solution points to a document library. If you want to provision files from a module to a document library, ghostableinlibrary type must be used: Specifying GhostableInLibrary means the file will be added to a document library in SharePoint together with ...


5

there are couple of ways. Run the Test-spcontentDatabase command against the content DB to get the list use this SharePoint Feature Administration and Clean Up Tool to identify and remove them You can use the powershell to get this done. http://get-spscripts.com/2011/08/diagnose-missingwebpart-and.html


4

Nobody knows. Well, nobody who is talking knows. However, on January 30 Microsoft has released Office 15 and SharePoint 15 into ‘Technical Preview’, a program that allows select users to try out the new software and provide feedback to Microsoft. You can download both document sets at http://www.microsoft.com/download/en/confirmation.aspx?id=28768 and ...


4

Esteban, The .CS code is compiled into the assembly. The actual .cs file is never deployed to SharePoint, so the only thing you would need to do is rebuild the WSP solution and upgrade it. This will update the assembly, recycle the app pool, and deploy your change to any web application. Beyond that, Ashish is right that removing a solution will not ...


4

Yet another version how to create a folder including nested folders using SharePoint SSOM. How to create nested Folder using SharePoint SSOM internal static class SPFolderExtensions { /// <summary> /// Ensure SPFolder /// </summary> /// <param name="web"></param> /// <param name="listTitle"></param> ...


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