Hi there,
i would like to ask your help related with a current issue that i am facing. So i am creating a Sharepoint Hosted Add-in, and in there i am trying to create a new content type with two new columns. So, i started to create the project via Visual Studio, based on the Office Developer tools project template for Sharepoint Hosted Add-ins. The project comes with a feature, and any artifact i add to the project, it goes to the feature. But when i run the application, the new content type neither the new site columns are created. I was trying to figure out the location of the feature, in order to check if the feature was successfully activated. I checked the developer site ( where is running the app ) and there is no feature there. Even i checked the app catalog, and it is not there as well.
So could you explain me where is located the feature and how can i have access to it? Or, how can i troubleshoot this problem in order to check what is going on ?
Thank you.
I do not believe you will see this feature in your host web. The content types you created exist in AppX site, not your /development site. They are all contained within the application itself.
Don’t think of Add-In’s as a deployment mechanism.They aren’t WSP’s of old… they are self-contained sites in and of themselves. So if you create a column in the Add-In, it’s only available in that add-in. If you create a list in the add-in, it will only exist in that add-in, it doesn’t exist on the site you are “adding the app”. The AppX site is used for creating little applications or webparts. You could create a Content Type/List/Columns. Plus you could add a webpart inside the add-in which uses those lists and content types. You could then use that WebPart on the host-site (Team1), but the List/Content Types/Columns do not exist on Team1, they only exist within AppX.
I understand what you mean. To be honest, my experience with add-ins was only using Provider-Hosted add-ins, with full trust, so i used to have full control over the tenant with the apps. Anyway, in that case i need the app to show content located in the host web, but the list / document library that contains that content needs to be changed in order to have the two additional columns… so i was trying to do that change in the list / document library via the deployment process of the app. Anyway, considering the scenario of Sharepoint Online, what would you recommend in that case to implement the list / DL changes? Powershell script? Thanks
Ok, so in that case what’s the AppX site? Additionally, if i have a Team Site, e.g., Team1, and if i add to this site my app ( via Add App option ), then would i have the content type and the site columns available in that site? Thank you. Ok, so in that case what’s the AppX site? Additionally, if i have a Team Site, e.g., Team1, and if i add to this site my app ( via Add App option ), then would i have the content type and the site columns available in that site? Thank you. Ok, so i forgot the detail that the host web and app web urls are reflected in the URL to access the app itself. I got the SPAppWebUrl from the query string, and basically as i told you above, the app site in this case is: https://yoursite-69953d60bfd33b.sharepoint.com/sites/development/AppX and in this case when i access the app, it goes to the default page in the following address: https://yoursite-69953d60bfd33b.sharepoint.com/sites/development/AppX/Pages/default.aspx If i try to acess the Site Contents page in the app web, so: https://yoursite-69953d60bfd33b.sharepoint.com/sites/development/AppX/_layouts/15/viewlsts.aspx i get the following error: “The endpoint /sites/development/relevantpages2/_layouts/15/viewlsts.aspx is not accessible in the context of a SharePoint App.” So, that means i cannot access it at all? Thank you.