sharepoint-apps

Using Sonar MSBuild Runner with /p:IsPackaging=True

断了今生、忘了曾经 提交于 2020-01-04 03:51:44
问题 I've a Visual Studio Team Services build definition containing a Visual Studio Build task surrounded by the Sonar Begin Analysis and End Analysis task. The Visual Studio Build packages a SharePoint provider hosted add-in using the /p:IsPackaging=True property. If this property is set I get the following error from the Sonar Build Runner: 2015-11-27T13:23:05.9534586Z WARNING: Duplicate project GUID: "31ef7995-fdbc-4307-9024-a3d640fdf987". Check that the project is only being built for a single

Using Sonar MSBuild Runner with /p:IsPackaging=True

痴心易碎 提交于 2020-01-04 03:51:12
问题 I've a Visual Studio Team Services build definition containing a Visual Studio Build task surrounded by the Sonar Begin Analysis and End Analysis task. The Visual Studio Build packages a SharePoint provider hosted add-in using the /p:IsPackaging=True property. If this property is set I get the following error from the Sonar Build Runner: 2015-11-27T13:23:05.9534586Z WARNING: Duplicate project GUID: "31ef7995-fdbc-4307-9024-a3d640fdf987". Check that the project is only being built for a single

SP.Web.getFileByServerRelativeUrl(fileUrl) not working

落花浮王杯 提交于 2019-12-13 02:48:34
问题 I am using SP.Web.getFileByServerRelativeUrl(fileurl) function of sp.js library. My site hierarchy is like this Host Web App1 Web DocumentLibrary1 App2 Web wher App1 Web is a web created by my sharepoint 2013 app 1, and App2 Web is a web created by my sharepoint 2013 app 2. In app2 i try to get a file from App1 Web->DocumentLibrary1. here is my code var ctx = SP.ClientContext.get_current(); var appctx = new SP.AppContextSite(ctx, 'hostweburl/app1'); var file = appctx.get_web()

Sharepoint Online: Copy attachment of list item to a new item using Client object model

末鹿安然 提交于 2019-12-12 02:54:22
问题 I want to read the attachments from one list item (in ItemCreated event) to another, new ListItem. How can I do this with the Client Object Model ? All I found is server-side code... Another question: Are the attachments also deleted when I delete a list item or are they still existing on the server? 回答1: I got it! The following code worked for me: private static void NewTryToAttachFiles(ClientContext ctx, Web web, List fromList, ListItem fromItem, List toList, ListItem toItem) { string src =

Sharepoint Online: Create & use List in Provider Hosted App (C#)

走远了吗. 提交于 2019-12-11 12:09:12
问题 I'm new to SharePoint programming and have the following problem: I added a List to my Visual Studio SP project (SampleAddInList). Now I want to get the list in my program to fill in an example item. Here is the Screenshot of my Visual Studio project with the list: Here my code where I try to get the list to add an item: private void AddUserToList(string accessToken) { if (IsPostBack) { sharepointUrl = new Uri(Request.QueryString["SPHostUrl"]); } ClientContext clientContext = TokenHelper

Sharepoint Online: Difference between SPAppWebUrl & SPHostUrl

爱⌒轻易说出口 提交于 2019-12-10 11:45:56
问题 Can someone explain what's the difference between the usage of SPAppWebUrl and SPHostUrl - from examples I guess that these URLs influence the context which is accessed. Is this correct? And if yes - what are the differences in general (I already saw that Web.Lists gets back another collection of lists)? And are there more context URLs which I can use in my provider hosted app? Could this be the issue of my other problem? See Sharepoint Online: Create & use List in Provider Hosted App (C#)

Sharepoint Online: Difference between SPAppWebUrl & SPHostUrl

一笑奈何 提交于 2019-12-06 15:41:03
Can someone explain what's the difference between the usage of SPAppWebUrl and SPHostUrl - from examples I guess that these URLs influence the context which is accessed. Is this correct? And if yes - what are the differences in general (I already saw that Web.Lists gets back another collection of lists)? And are there more context URLs which I can use in my provider hosted app? Could this be the issue of my other problem? See Sharepoint Online: Create & use List in Provider Hosted App (C#) SPHostUrl is the url of the host url as the name already tells. That means it is the url of the

SharePoint App Deployment error : 'Failed to install app for SharePoint'

半世苍凉 提交于 2019-12-03 23:47:19
When I tried to add a SharePoint mvc app I am getting following error: Error occurred in deployment step 'Install app for SharePoint': Failed to install app for SharePoint. Please see the output window for details. Detailed stack trace: CorrelationId: 50583239-71cb-4b07-8bcb-4bbc51a22631 ErrorDetail: There was a problem with activating the app web definition. ErrorType: App ErrorTypeName: App Related ExceptionMessage: Microsoft.SharePoint.SPException: Exception from HRESULT: 0x81070964 ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x81070964 at Microsoft.SharePoint