47

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


25

You need to restart the SharePoint timer service (Start > Run > Services.msc). The timer jobs code get cached in the timer.


23

Make sure that you have already configured the “Outgoing e-mail settings”. //Get the site ID Guid siteID = SPContext.Current.Site.ID; protected string GetSMTPHostName() { using (SPSite site = new SPSite(siteID)) { //Get the SMTP host name from “Outgoing e-mail settings” return site.WebApplication.OutboundMailServiceInstance.Parent.Name; ...


23

Short explanation: As far as usage is concerned, in many common cases there are almost no actual differences - anything you can do with a webpart you could do with a visual web part. For many points of view the visual web part is only a tool that enables the developer to work with a user control instead of creating all controls in codebehind. Visual web ...


18

Assuming that you already have a reference to the list item (called "item" in the following code sample), you must first get a reference to the list field and then use the GetFieldValue method to read the actual value. SPFieldUser userField= (SPFieldUser)item.ParentList.Fields.GetFieldByInternalName(internalName); var fieldValue = ((SPFieldUserValue)...


17

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


14

This should help - "SharePoint Terminology – Farms, Web Front Ends, Web Application and Sites" Specifically - "what is difference between Web and WebApplication?" Generally when you see "Web" mentioned in programming terms (SPWeb) it actually means a means what a user calls a site and a "Site" (SPSite) is a site collection. A Web Application is a unit of ...


14

F5 debugging is pretty cool, but for small and not complicated projects. You know, that by pressing F5 your solution will be deployed again, including all steps - add solution, install solution, activate features. And it often takes really long time. There is a couple of extensions for visual studio that makes your life easier. As for me, I use CKS DEV ...


14

Select the project file in Solution Explorer and press F4 (or View, Properties Window). In the properties which appear in the new window, there is a Site URL:


13

You should recreate context. SPSecurity.RunWithElevatedPrivileges(delegate() { using(SPSite site = new SPSite(properties.SiteId)) { using(SPWeb web = site.OpenWeb(properties.Web.ID)) { //code } } });


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.


12

Since your file in _layouts directory, why not to use GetGenericSetupPath method? Something like this: var path = SPUtility.GetGenericSetupPath(@"TEMPLATE\LAYOUTS\MyPoject\data.xml"); UPD: This method is obsolete in SharePoint 2013, you should use GetCurrentGenericSetupPath or GetVersionedGenericSetupPath Thanks for noticing that fact in comments.


11

Just try to run this from the run dialogue net stop sptimerv4 net start sptimerv4 this should do the trick.


11

When you deploy a solution with a WebPart it deploys three things: The dll with the web part A SafeControl entry to be inserted into web.config A .webpart (or .dwp) file with configuration settings to be inserted into the Web Part Gallery (this part actually happend at feature activation not at solution deploy, but..) When you're adding a web part to a ...


11

I discovered that the problem comes from the program Microsoft Visual Studio 2010 Shell (Isolated) - ENU that gets installed with SQL Server 2012. After uninstalling that program and then running the SharePoint 2013 installer I am able to see the splash screen. Warning - This will prevent Sql Server Management Studio 2012 from working on that machine.


10

SharePoint only shows Incoming Email settings link for OOTB lists of type Announcements, Event, Document Library, Picture Library, XML Form, Discussion Board, Posts. So, if you create a custom list, you need to create a custom email event handler and attach to your list and then Incoming Email settings link will be available. More info: http://social....


10

You can create a Visual Web Part for SharePoint 2013 Online. Your web part will be contained in a Sandbox Solution which you will develop locally. Once development is complete you will upload the Solution Package created by Visual Studio to SharePoint Online. Once this is done your web part will be available for use. As mentioned, development will be done ...


10

In order to develop SharePoint Solutions (as opposed to Add-ins/Apps) you have to run SharePoint on the machine running Visual Studio and the Site you you debug on must be one hosted by that SharePoint Farm. Before you continue down this road make sure you really want to create a SharePoint Solution.


10

First, The above code is Server-side object model, not Client Side object model so you should use Microsoft.SharePoint not Microsoft.SharePoint.Client namespace Second, the CamlQuery is used with Client Side object model at Microsoft.SharePoint.Client namespace. Third, in Server-side object model you should use SPQuery with Microsoft.SharePoint Fourth, ...


9

Check what user vssphost14.exe (or vssphost15.exe) is running as (Generally the same user you are using to run VS) Launch SQL Management Studio and connect to your SharePoint SQl Instance Ensure the above user has DB_Owner rights on each of the following databases: SharePoint_Config SharePoint_AdminContent Content DB for the Site collection you are ...


9

Actually, retraction of a WSP solution is part of the standard functionality of Visual Studio 2010 and it happens after you stop the debugger. It can be deactivated by un-checking the "Auto-retract after Debugging" checkbox available in the bottom of the SharePoint tab page, of the Project Properties (right-click your project and choose properties). Indeed, ...


9

Remove feature receiver Clean solution Close Visual Studio Delete SharePoint project's obj folder in Windows Explorer Delete SharePoint project's bin folder in Windows Explorer Open Visual Studio and re-add feature receiver Start Debugging


8

Actually you don't need to modify the OOTB files. In fact, it's a very bad idea, since Microsoft doesn't support modifying any of OOTB files in Layouts directory, except of DocIcon.xml. Any cumulative update or SharePoint service pack can replace these files, so your customizations will vanish in one moment. What you need to do, is to create your own file, ...


8

i also got it and solved .. temporarily turn off anonymous authentication on the web application... this can be done as... Open Internet Information Services (IIS) Manager: If you are using Windows Vista or Windows 7: On the taskbar, click Start, and then click Control Panel. Double-click Administrative Tools, and then double-click Internet Information ...


8

"Assembly Deployment Target" property is disabled at a sandboxed solution, you're correct. But it's also disabled when developing a farm solution when the property "Include Assembly in Package" in the same properties window is set to False. Can you verify this setting?


8

If you want to declaratively attach the event receiver, you may specify ListUrl in the Receivers Element. <Receivers ListTemplateId = "Text" ListTemplateOwner = "Text" ListUrl = string RootWebOnly = TRUE | FALSE Scope = Site | Web> </Receivers> How to: Create an Event Receiver for a Specific List Instance


8

To rename the Title that will be visible for the end user, open Elements.xml-file in the webpart-module. Locate the <File>-element and add <Property Name="Title" Value="My Display Title" /> The Elements could look like something like this: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/" ...


8

You cannot add an event receiver through the "Add new project" dialog. What you do is create an empty sharepoint project first. Then just right click on said sharepoint project, click add new item, go to Office/SharePoint and choose Event Receiver. See my screenshot.


8

If you add list using ListInstance then you can add items using ListInstance file: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ListInstance Title="LinkList" OnQuickLaunch="TRUE" TemplateType="170" FeatureId="Your feature id" Url="Lists/LinkList" Description="Your description"> &...


8

Answering your 4 questions: Differences Remote Event Receiver (RER) - A provider hosted app is must, which means you need additional infra Works using web services, you expose web services on your provider hosted app, that are called when an event is fired. Only Client Object Model is available inside the event receiver code, so you'll be limited by CSOM'...


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