51

Welcome to SharePoint Stack Exchange! In your Visual Studio 2012 SP Solution: Enable Always Force Install to True in for your feature. See example below: By default, it is set to False. You can configure that to be set to True.


48

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


16

I had the same problem today. I compared the project files with an older version. In my case the Package directory (with the files Package.package and Package.Template.xml) was missing. After copying this directory back from the older version of the project and modifying the csproj file to include the references to the package directory, the error solved ...


14

You need to change the order of Additional Assemblies defined on the SharePoint package since in Visual Studio 2013, this now makes a difference. My issue (and I suspect yours) was that several of my non-SharePoint projects had dependencies on each other and had to be built in a particular order. This was not an issue in Visual Studio 2012. To change the ...


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.


13

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 have two web applications, A and B on the same SharePoint farm. You want to deploy solution S which contains a visual web part to web application B, but it is ...


13

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 where all components are hosted on either an on-premises or Office 365 SharePoint farm. SharePoint-hosted apps are installed on a SharePoint 2013 website, called ...


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


9

I would recommend these links Setup the development environment in SharePoint 2013 : http://msdn.microsoft.com/en-us/library/ee554869.aspx Develop in SharePoint 2013 : http://msdn.microsoft.com/en-us/library/jj163085.aspx How to create a basic SharePoint hosted App : http://msdn.microsoft.com/en-us/library/fp142379.aspx First Time Configuration For Apps : ...


8

within your solution click on feature.feature and goto its properties, you should now see somthing on the lines of Always Force Install just set that to true and you dont need to do the force attribute anymore! looks like a feature wasnt retracted properly and has become a phantom! ybs has a similar issue here! Visual studio Both site collections ...


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.


7

Actually Visual Studio 2010 Professional, Premium and Ultimate all allow for SharePoint development as the "Office and SharePoint development tools" are available for all (see here http://download.microsoft.com/download/4/6/E/46E8BB6C-108F-467C-9292-50EE94F117B5/download/Visual-Studio-2010-Feature-Comparison-Matrix.pdf) Same stands still with Visual Studio ...


7

Add an id: <pre id="myId" .... And then hide it with jquery: addNewTest = function() { $('#myId').hide(); }); or without jquery: addNewTest = function() { document.getElementById('myId').style.display = 'none'; });


6

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 with the path of the wsp file you just added to deploy, it should also deploy itself after the update. Update-SPSolution -Identity "name wsp" -LiteralPath "path ...


5

I should have checked this earlier. I made 2 empty SharePoint projects. One 2010 and one 2013 and did a compare of the different files. The only difference i could find was in the csproj file. In the SP 2013 project there is a <TargetOfficeVersion>15.0</TargetOfficeVersion> property that was not present in the SP 2010 project. I added it and ...


5

You need to reference following JavaScript file: <SharePoint:ScriptLink ID="ScriptLink2" name="SP.UserProfiles.js" runat="server" ondemand="false" localizable="false" loadafterui="true" /> Than you can access the User Profile Properties as follows: var personProperties; // Ensure that the SP.UserProfiles.js file is loaded before the custom code ...


5

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 can find them here: http://code.msdn.microsoft.com/sharepoint/


5

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 for the <None Include="Package\Package.package"> tag. In my case it was not there. So I got another working solution's .csproj file and copied the entire ...


4

This may be unrelated, but did you put a proper URL in your project's Site URL field, and can you properly deploy and activate an empty solution from VS? I find that the designer files are not generated properly if my site URL is faulty (VS can't connect to it) or if I lack the permissions to deploy and activate a solution from within Visual Studio.


4

Solution was: Register-SPWorkflowService –SPSite "http://localhost/yourSite" –WorkflowHostUri "https://localhost:12290" –AllowOAuthHttp had to be executed!!


4

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 webapp with a site collection eg.: http://mysomething:5040 and visual web part was created successfully with the design file "....g.cs".


4

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://msdn.microsoft.com/en-us/library/ms436075.aspx and the ActivateOnDefault attribute.


3

Double click on the feature.... then in the properties window make ALWAYS FORCE INSTALL = true... and there u go.....


3

Find the ID of the content type you are deriving from (in your case it is 0x0101 i.e. Document Content Type). So, make sure 0x0101 is present by examining the content type in the SharePoint UI (Site Settings > Manage Content Types). You'll get an exception (as you're getting right now) on feature activation if it's not, or the Inheritance between Content ...


3

Go to Central Administration -> Services on Server Check if the App Management Service and Subscription Service are started. You can use the following PowerShell to start them: Get-SPServiceInstance | where{$_.GetType().Name -eq "A ppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsSe rviceInstance"} | Start-...


3

Your xsl file should be located here: c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\XSL\ To map your xsl file to this folder you need to create Sharepoint Mapped Folder. Here is explanation how to do that.


3

My suggestion would be a feature event receiver. In the feature activating perform your checks to see if the doc libraries exist and if the folders exist and if not create them. Here are two articles from MSDN to get you started. The same process for 2010 will apply to SharePoint 2013 in this instance. http://msdn.microsoft.com/en-us/library/ee231604.aspx ...


3

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 = "http://blogs.microsoft.com/feed/"; private const string DateDisplayFormat = "MM-dd-yyyy"; private static List<BlogArticle> blogArticles = new ...


3

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 deleted properly. this feature will not be listed in your powershell also when you try to search which features are available in your farm. So better way to ...


3

you can use this code to retrive the items from MSDN: // Starting with ClientContext, the constructor requires a URL to the // server running SharePoint. ClientContext context = new ClientContext("http:SiteUrl"); // Assume the web has a list named "Announcements". List announcementsList = context.Web.Lists.GetByTitle("Announcements"); // This creates ...


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