The Stack Overflow podcast is back! Listen to an interview with our new CEO.
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-...


17

It's called "Publish" now. Functionality is basically the same.


16

This can occur when an installed feature is renamed. Either reverse the rename or uninstall the feature. PowerShell's Uninstall-SPFeature <Guid> -force will not work. You should use stsadm -o uninstallfeature -id <Guid> -force instead.


12

There is a related question on SharePoint StackExchange: How to remove orphaned features Remove all the orphaned features: Get-SPFeature | ? { !$_.Scope } | % { $_.Delete() }


12

We can either manually do it through central admin or by using powershell commands. I would prefer doing this through powershell To uninstall and remove Farm solutions use the Uninstall-SPSolution and Remove-SPSolution cmdlets (Use -WebApplication attribute if the solution has webapplication-scoped resources): Uninstall-SPSolution –Identity ...


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

Ok, for the wsp part follow laurie, or if your lazy add wspbuilder to visual studios to build the wsp for you. now to add the masterpage and css: create an empty project add module as you can see above, remove the sample.txt, right click styles and add your masterpage and add another module for css :) for the css, click on the elements.xml and add the ...


9

If the WSP has any assemblies in it - no. The assemblies developed for SharePoint 2010 will be referencing the SharePoint 2010 core assemblies, and will fail when trying to load them in SharePoint 2007. If the WSP only has XML in it, and no server side code in assemblies, it should deploy fine, given it has no Feature code that's new in 2010 (such as ...


9

You can tell the status of a deployment by observing the combined values of the Deployed and JobExists properties of the SPSolution object. SPSolution.Deployed True - Solution is deployed False - Solution is not deployed SPSolution.JobExists True - A retract/deploy job exists for this solution. False - No job It's important to check both of these ...


9

I assume that you are missing adding the dll to your solution package and that it should be added to the gac. If this is the issue, you can resolve it by opening the Package node in your solution and then switching to the advanced tab. Here you can define any additional dll that your solution should deploy. This blog post should guide you through the whole ...


9

As a short answer: No You can't add two different versions of the same solution name in the same environment. Workarounds You have 2 workarounds Redploy the same solution with a different name. In UAT and Production farms, Try to do the following: Back up the current solution as mentioned here. Retract and remove the old version using PowerShell. ...


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

2007 version stsadm -o upgradesolution -filename "drag drop the file here" -name "copy the name here including the wsp" -immediate -allowgacdeployment just replace the writing in quotes with what is says! plus put them in quotes. DONT copy past the code above as it will execute and only throw an error, just write it out! that should do the trick ;) hope ...


8

Install-SPSolution -Identity <solution.wsp> -WebApplication <name or guid of web app> -GacDeployment the above should work! what is your solution scoped to? farm webapp site web? It should be scoped to site to be deployed to a specific webapp! under central admin look at the wsp list and see where its currently deployed to, is it global or to ...


8

I think This is especially the case if you have just done a retract/uninstall and you try to add straight away. If you try again in a few seconds it will work. Basically this is because when you delete a wsp from solution management and then immediately run this stsadm command, there will still be clean up operations going on in the background. So just leave ...


8

Open solution in Visual Studio. Right click on the solution and deploy or build the solution. Now check your solution configuration If your are in debug mode, then find your .wsp in the following folder PathOfYourSolution\bin\Debug If your are in release mode, then find your .wsp in the following folder PathOfYourSolution\bin\Release


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 deploy a .wsp farm solution you need to be a local administrator on the server: Adding a solution package Before you can deploy a solution package, you must add it to the solution database of a SharePoint Server farm. Important: You must be a member of the Administrators group on any computer on which you run Windows PowerShell. To ...


7

As far as I know, you can only open the wsp file as a cab and modify the files from there. The downside is that all the code will be compiled into assemblies and there will be no way to extract the code from them. You could create a new Visual Studio web part project and add the assemblies from the wsp file and see if there are any open facing classes or ...


7

It seems as if Install-SPSolution and Uninstall-SPSolution has been written by two different developers (or at least at different times) Both commands have the potential of accepting either no, a single or all WebApplications how they deal with these option are quiet different. Install-SPSolution This is the well coded one, where the decision is base on: ...


7

Package a WSP Right click your project in the right column. Then click "Publish". A dialog will open, where you will get to choose where to place the resulting .wsp file. After clicking "Publish" your project will be build and then packaged in the selected location. Make sure to have the Solution configuration set to Release when building for production. ...


7

You can have multiple SharePoint projects (.csproj) in the same Visual Studio solution (.sln). Each SharePoint project builds into a WSP (right-click on the project and select "Package" or "Publish" depending on your version of VS). "Package" (or "Publish") will first build the project and then create the .wsp. A Visual Studio Solution (.sln) is not at all ...


6

You do not need the pkg or the pkgobj folders, they are temporary and used by the packaging routine


6

There is no good way to debug in SharePoint online. You basically have two options Remove/add pieces of declarative content one at a time to rule out any failing parts If you have code that do the provisioning, use a list to log all exceptions.


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

I've implemented this method in the past, so I just share my code with you: add: private void AddAuthorizedType(SPWebApplication webApplication, string assembly, string namespace_) { SPSecurity.RunWithElevatedPrivileges(delegate { var modification = new SPWebConfigModification(); modification.Path = "configuration/System.Workflow....


6

We've found it's much easier to just add a webconfig.something.xml file to the Config folder. So for your one entry you can create an xml file with these contents: <?xml version="1.0" encoding="utf-8" ?> <actions> <remove path="configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes/authorizedType[@Namespace=&quot;...


6

The best solution is to use the SPSolution.LastOperationResult and SPSolution.LastOperationDetails properties. $solution = Get-SPSolution -Identity:$file while ($solution.JobExists -eq $true) { Write-Host '.' -NoNewline sleep -Seconds:1 $solution = Get-SPSolution -Identity:$file } $lastOperationResult = $solution.LastOperationResult return ($...


6

In your VS2010 solution double click Package.package In the bottom of the editor switch to the Advanced tab: This will bring you to a screen where you can add external assemblies to the WSP package


6

DON'T There is no way this is going to turn out well. Changing the name of the WSP isn't going to change anything. You'll still have the same: Solution Id Feature Folders and Ids Dlls (including the codebehind for your application pages) SharePoint Root files (including your application pages) So in order for the new solution not to overwrite the old you ...


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