2022 Developer Survey is open! Take survey.
15 votes

Feature has already been installed. Use the force attribute to explicitly re-install the feature

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 ...
user avatar
13 votes
Accepted

What is the difference between auto hosted, provider hosted and sharepoint hosted app?

The following image can give you an overview of the entire app schema: Following you can read the definition for each type of hosted app: Sharepoint hosted app SharePoint-hosted apps, or apps ...
user avatar
7 votes
Accepted

How to show and hide a paragraph in html when a button is clicked?

Add an id: <pre id="myId" .... And then hide it with jquery: addNewTest = function() { $('#myId').hide(); }); or without jquery: addNewTest = function() { document.getElementById('myId'...
user avatar
  • 617
6 votes

Feature has already been installed. Use the force attribute to explicitly re-install the feature

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 ...
user avatar
  • 61
5 votes

The name 'SharePointContextProvider' does not exist in the current context

Has your method the following attributes? [SharePointContextFilter] But more important. Are in your MVC application included the SharePoint context file? SharePointContext.cs and TokenHelper.cs You ...
user avatar
  • 540
5 votes
Accepted

Package designer is missing from visual studio solution

After searching on internet for hours and with the help of Mr. Kalpesh (my superior) I was able to find the solution. There is one .csproj file for each solution. Open this in the notepad and find ...
user avatar
  • 3,230
4 votes

the name 'initializecontrol' does not exist in the current context visual studio 2013

You are probably missing VisualWebpartName.ascx.c.gs file under your VisualWebpartName.ascx. Right click your VisualWebpartName.ascx and select Run Custom Tool . This will recreate .c.gs file and all ...
user avatar
  • 475
4 votes
Accepted

the name 'initializecontrol' does not exist in the current context visual studio 2013

I finally found one solution. It has all to do with the url of the site. It should be a valid url. It is a bit strange though because the url that I was providing was valid. To test it I created a new ...
user avatar
  • 1,897
4 votes
Accepted

Error while deploying SP2013 Workflow from VS2012: NullReferenceException

Solution was: Register-SPWorkflowService –SPSite "http://localhost/yourSite" –WorkflowHostUri "https://localhost:12290" –AllowOAuthHttp had to be executed!!
user avatar
  • 317
4 votes
Accepted

Turn off auto activation when deploying SharePoint 2010 feature

Web application scoped features are automatically activated at WSP deployment. This is controlled by the ActivateOnDefault property you can find in the property window of the feature in VS. See https:/...
user avatar
  • 9,666
3 votes
Accepted

Trying to setup a Provider hosted app

When developing a high trust provider hosted app in VS, you are asked "How do you want you app to authenticate". Here you have got two options. If you are developing for on premise you can select "Use ...
user avatar
3 votes

"Feature has conflicting event reciever settings" error

I had this problem. I was including the BDC module inside a feature that had an event receiver. It seems that the BDC module references its own event receiver and this means that it can't be included ...
user avatar
  • 182
3 votes

Visual Studio and Sharepoint development

VS2012 (I advise updating to Update 4 version which is up to date at the time of writing this) provides a number of updates regarding SharePoint 2010 development. Some of them are: Create lists and ...
user avatar
3 votes

Feature has already been installed. Use the force attribute to explicitly re-install the feature

I had this same issue and found that it was because of Orphaned Feature. There are chances that whenever you remove wsp from farm and redeploy it, then Feature associated with that wsp might not got ...
user avatar
3 votes

How to get rss feeds programmatically?

It is really simple. The best way is creating an External list using Visual Studio. Here is a service class I wrote. public partial class BlogArticleService { private const string FeedUrl = "...
user avatar
3 votes

Download files from document library using C#

using Microsoft.SharePoint; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace DownloadDoc { class ...
user avatar
3 votes

Getting Minor Version, Major Version, TimeCreated, TimeModified of document using CSOM

This error occurs since requested properties have not been loaded. You have to explicitly specify them in ClientRuntimeContext.Load method. Since you are getting ListItemAllFields property, you have ...
user avatar
3 votes
Accepted

How to deploy custom page via visual studio

The page can be deployed to Site Pages library using module. Sample module file code: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> &...
user avatar
3 votes

Migrating custom solution from 2010 to 2013

It depends on what resources does Your wsp contain. If there are images or pages, url paths are different in 2013, so links will be broken(by example /_layouts/ should become /_layouts/15, and so /...
user avatar
  • 1,581
3 votes
Accepted

How to generate a .wsp file for my Event Receiver using visual studio to be deployed inside my live environment

First off, a SharePoint solution package file is actually a cab file with a .wsp extension. If you switch the extension to .cab, you can open the file and extract the contents so you can examine if ...
user avatar
  • 1,675
3 votes

How to generate a .wsp file for my Event Receiver using visual studio to be deployed inside my live environment

The above answer is correct or you can have another option as- Delete the .WSP files from the \bin\Debug folder and rebuild the solution. You can find the current/updated date to the WSP. Or You can ...
user avatar
  • 2,444
3 votes

Is it possible to develop Event Receivers for sharepoint 2016 using MS Visual Studio Professional 2012

To develop Farm Solutions (which would contain event receivers) for SharePoint 2016 you need a machine with SharePoint 2016, Visual Studio 2015, and the Microsoft Office Developer Tools Preview 2 for ...
user avatar
  • 11.5k
2 votes

Visual Studio 2012. Visual webpart's ascx.g.cs file empty after registering any control

This one worked for me: Highlight YourControl.ascx file in solution explorer. In properties window locate Custom Tool property and set it to SharePointWebPartCodeGenerator If your *.ascx file is ...
user avatar
2 votes

How to send the Assignment Email with a link to the task in it SharePoint 2013 Visual Studio Workflow

Found out a solution... SharePoint 2013 provides something called the TaskEmailToken. The values are changed in the runtime. So if you want to add a link that will take you to the task page, add the ...
user avatar
  • 1,159
2 votes

How to add tooltips to SharePoint 2013 form fields

When the page goes to edit mode you can load the http://jqueryui.com/tooltip/ as dotsa suggested And then you should be able to attach the tooltip using the class or any selector say $( document )....
user avatar
2 votes

How do I access a Property argument in a SharePoint 2013 Workflow?

You've almost got it... you have to write an expression in that condition that evaluates to TRUE/FALSE. So something like testProp == 'something'
user avatar
2 votes
Accepted

how to specify icon image for 2013 SharePoint custom app built in Visual Studio 2012?

for your #2, When on AppManifest.xml, chose your icon using the ellipsis(...) and make sure it's in the format HelloWorldSPHostedApp/Images/AppIcon.png , provided your icon's image is under Images ...
user avatar
  • 4,169
2 votes
Accepted

download file from OneDrive using Microsoft.SharePoint.Client

Use File.OpenBinaryDirect method to downloads the specified file from a SharePoint site. The following example demonstrates how to download file from a Library by providing its item Id. Example //...
user avatar
2 votes
Accepted

Getting Minor Version, Major Version, TimeCreated, TimeModified of document using CSOM

if this helps anyone, this code returns the values I needed. List listFields = context.Web.Lists.GetByTitle("Financial Notes"); context.Load(listFields); context.Load(listFields.ContentTypes); ...
user avatar
2 votes

SharePoint 2013 workflow stuck in started stage

I went through the same issue, here's how I resolved it: First check the Troubleshooting section here: http://technet.microsoft.com/en-us/library/jj658588(v=office.15) mainly, my issue was was ...
user avatar

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