Hot answers tagged

59

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


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


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


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


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

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

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

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

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


4

The anwser to this problem is really strange... I forgot to mention I've edited the page in my list and changed the "Toolbar type" in the list-view-webpart to "No toolbar". But by setting this, custom action buttons in the ribbon hide... So I solved it by setting it to "Full toolbar" again, and the ribbon button becomes visible again!


4

If you know the name of the feature, you can retrieve the feature's definition ID by iterating the SPFeatureDefinitionCollection. Guid yourGuid; foreach (SPFeatureDefinition featureDef in web.FeatureDefinitions) { if (featureDef.DisplayName == "YourTitle" && featureDef.Scope == SPFeatureScope.Web) // Check the scope just to be safe { ...


4

Take a read of this first off: Previous stack exchange answer Web targets the site, site targets the site collection etc etc. So web is only available on the site you point it at, be it the site collection or a sub-site and only in that location. A site collection is just a special sort of site. Web: At the target site/site collection only Site: At the ...


4

You can only have Content types at Site or List level. So, even if your feature is scoped as web the Content types will be added to the Site level (at root web). From there on, content type will be available, to be added to the lists and document libraries in all webs and so on.


4

make sure the solution deployment job was finished before you activate the feature. have a look at this blog: Programmatically waiting on SharePoint Solutions to deploy


4

Are you missing custom solutions in your new 2010 farm, that exist in the 2007 farm? Compare the installed features/solutions in both farms. However, you really should upgrade to SP2. The preupgradecheck stsadm command was added in SP2 and is very good at identifying where you're going to have issues. The upgrade alone may even solve your problems.


4

function Deactivate-SPFeature { param ($FeatureID, $SiteUrl, $WebApplicationUrl) $Feature = Get-SPFeature -Identity $FeatureID -ErrorAction SilentlyContinue $IsActiveFeature If ($Feature -eq $null) { Write-Warning "The specified feature ($FeatureID) was not found." return } If ($Feature.Scope -eq [Microsoft....


4

I have faced the same situation many times. I used a tool called Feature Admin. It shows any features that are isolated and cannot be used including error occured. You can delete the unwanted or error occurred features through it.


4

I guess your mistake is that SPSite is not the properties.Feature.Parent when your Feature has Scope Webapplication. Try this instead: SPWebApplication webApp = (SPWebApplication)properties.Feature.Parent; foreach (SPJobDefinition job in webApp.JobDefinitions){ if (job.Name == List_JOB_NAME) job.Delete(); }


4

If it's a newly added feature you have created then how you deployed your solution. I had also faced same problem. If you have updated your solution than it probably not be there. because there are changes in package file. Retract and remove your solution then add and install your solution. Remember if new feature added then you have to retract and add the ...


4

Make the feature scope in Visual Studios be "Site" instead of "Web". https://msdn.microsoft.com/en-us/library/ee231541.aspx


3

Moussa, That all depends on your requirements and scenarios.. Let's say you have a website and you created some pages and webparts, did some branding and now you want to use this website for other SharePoint farm or same farm with different applications then you can SAVE SITE AS TEMPLATE and use the template to create new sites! You can see what is ...


3

As almost always with SharePoint the answer is it depends. My criteria would be: Should end-user be able to change the file? If not how many features should use this file? Depending ot the answers to the questions above pick the appropiate section below End-users should be able to change the file Put the file into a document library at the appropiate ...


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