Hot answers tagged

44

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


18

There are quite a few things to consider in organizing your structure, or else maintanance or understanding the code becomes a nightmare (even if you revisit after a few years). A similar question was asked in an earlier best practices post. Some rules I follow are: Keep all projects in one folder ("Projects"), keep solutions in another folder ...


17

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


17

With Visual Studio 2010 it is easy to build a WSP. Additional tools are not required, especially for a project as you described. The basic steps are: Create a new SharePoint 2010 project using the Empty SharePoint Project template. For each of your items that you want to add, right click on your project in Solution Explorer and choose Add New Item. Choose ...


12

If you read Vesa Juvonens super-article about SharePoint 2010 WebTemplates, http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx, you will see how he organizes and names features and SPI's. It's a very good approach and it mmakes it very easy to locate SPI's and features in the (not so user-friendly when you have tons of ...


12

Not sure why it wasn't working through the Central Admin but I ended up doing it through the Management Console using the following commands: Uninstall-SPSolution -Identity mySolution.wsp -allwebapplications Remove-SPSolution -identity mySolution.wsp -force Hope this helps someone.


11

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.


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


10

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


9

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


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

I have to disagree with James. The SPContentType in SharePoint 2010 has a new constructor that lets you specify the content type id. The addition of the Inherits attribute of the ContentType element makes the behavior of content types described in CAML inconsistent. Finally, the Feature upgrade mechanism is great if you are adding fields but it doesn't ...


8

Project Structure - I'm still experimenting with different styles, though it seems to be the norm to split off artefacts (such as c# WebParts) atomically, and use project references to include a "release version" of that project into a SharePoint Project designed solely for Packaging. This prevents you from building half-finished and broken code and ...


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


7

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


7

In the Timer Job project, open the package designer. Click Advanced (bottome of the designer) Click Add, and choose Add Assembly from Project Output. Select Project A Repeat selecting the other project. All your assemblies will be in the Timer Job solution, and is the only one you need to deploy to SharePoint.


7

I think that any .Net guidance that you can find is a really good start, since it's still a .Net project. You could look at the Developing Application for SharePoint 2010 from the Microsoft Patterns & Practices, which is more specific.


7

When you have common/shared components, like the helper DLL you talk about, that get used across multiple solutions within you organization. My recommendation is to package these up as a 'framework solution' that is deployed to the servers indendently of the 'feature based solutions'. This way you 'feature solutions' are developed in the knowledge that ...


7

If the solution has no web application resources it is considered a global solution and does not actually need to target an web applications. Remove the -AllWebApplicaitons and this global solution will be deployed globally to the farm and will be available to all web applicaitons.


7

As the documentation states, when you add new artifacts to a solution you need to reinstall it. Really nothing new here, except for support for solution dependencies (and this is really only half implemented, since you can delete solutions that other solutions depend upon without getting any warning) Feature upgrade is an entirely different matter. No ...


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


6

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


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


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


6

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


6

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


6

Just changed the files extension of your wsp from .wsp to .cab and open it. If you would like to open the file contents of your wsp to visual studio, create a new project in visual studio with "Import SharePoint 2010/2013 Solution Package" project type and choose your wsp to load all its files structure to solution explorer. OR if you want to make use of ...


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.



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