0

New to Add-ins i am creating a SharePoint Hosted App in Visual Studio 2015. When i try to publish my app it creates the following structure in the Debug folder looks like this:

  • DEBUG
    • app.publish
      • 1.0.0.0
        • projectName.app
    • projectName.pdb
    • projectName.wsp

can someone explain why there is a .wsp file at the top level for a SharePoint Hosted App? I thought the only wsp that would be created is contained in the .app file (which by the way there is a wsp inside there along with a wsp.config.xml file and others)

2 Answers 2

2

The distribution mechanism used by a SharePoint app to add pages and lists to the app web during installation is a standard solution package, which is a CAB file with a .wsp extension.

The one difference is that the solution package used by the SharePoint app model to add files to an app web is not a stand-alone file. Instead, it is embedded as a .wsp file within the app package

When a user installs a SharePoint app, the SharePoint host environment examines the app package to see if it contains an inner solution package. It is the presence of an inner solution package within the app package file that specifies to the SharePoint host environment whether it needs to create an app web during installation. If the app package does not contain an inner solution package, the SharePoint host environment installs the app without creating an app web.

The app web solution package contains a single web-scoped feature. The SharePoint host environment activates this feature automatically on the app web immediately after the app web is created. This feature is what makes it possible to add declarative elements such as pages and lists to the app web as the app is installed.

2

If I remember correctly. The first wsp file contains the information your app needs to create the App Web. It contains the information around things like the app web itself, any lists or libraries included in the add-in. The secondary wsp file is simply the package of your solution. Remember, a wsp file is basically just SharePoint's version of a cab file.

There is more in-depth information here: https://msdn.microsoft.com/en-us/library/office/fp179918.aspx#Package

3
  • Can you point me to some info how to deploy these types of Add-ins? This is outside the realm of just point to the .app file in the App Catalog
    – Anthony
    Commented Jan 14, 2016 at 21:31
  • Is your solution not deploying? It shouldn't be anything majorly different. Technet has a great series on creating a basic add-in, deploying it and enhancing it. You can find it here: msdn.microsoft.com/en-us/library/office/mt148586.aspx Commented Jan 14, 2016 at 21:38
  • after some investigation, the app deploys fine without having to do anything with wsp file that resides at the top level in the DEBUG folder. thank you all for the info
    – Anthony
    Commented Jan 15, 2016 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.