Question

I set up a development environment with Visual Studio based on Server 2012, running SharePoint 2013. My project is an event receiver that I'm using to log fileAdded and other events. I'm able to run, test and debug everything just fine.

My question is in regards to how I can deploy my project on a separate production server? I've been going over documentation, but a lot of what I'm finding doesn't list SharePoint 2013 (I'm going off mostly 2010). When building for release, I get a directory with my feature folder, and all the referenced dll's, along with a manifest.xml. In the feature folder, I get the event receiver folder and the feature.xml file. Finally, in the event receiver folder, there is the elements.xml file.

I've tried adding that base directory to the features folder as was specified in documentation (C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES), but trying to add that directory or and sub-directory with the SharePoint management shell (tried both relative and absolute paths) just gives invalid data errors.

This event receiver is intended to be deployed as a farm solution. Is there any type of installer or packaging tool I can use to make deployment easier? Are there any SharePoint 2013 tutorials out there for something of this nature?

Was it helpful?

Solution

Everything you need is built into Visual Studio.

SharePoint farm solutions are packaged as a .wsp file. This file contains all of the assets related to your solution including the feature files, DLLs, etc.. When you build a farm solution in Visual Studio, every time you deploy locally the .wsp file is added to your \bin\debug or \bin\release folder, depending on which mode your in.

Grab that and deploy it to your other SharePoint environment using the PowerShell commands Add-SPSolution then Install-SPSolution. http://technet.microsoft.com/en-us/library/ff607552(v=office.15).aspx http://technet.microsoft.com/en-us/library/ff607534(v=office.15).aspx

Deploying the SharePoint solution this way ensures everything in your solution is placed correctly on all servers in your production environment. You should never need to manually add files to the 15 hive (SharePoint Root) handle DLLs manually

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top