Generate .app file for SharePoint Apps using MSBuild and Visual Studio 2015/2017

This SharePoint Apps tutorial, we will discuss, how to generate the .app file using MSBuild as well as from visual studio 2015/2017/2019.

You can use visual studio 2015/2017 to develop the SharePoint hosted apps or add-ins.

Generate SharePoint .app file using MSBuild

After developing the .app file, open the visual studio 2015 command prompt. Then run the command like below:

msbuild /t:Package “E:\Users\Administrator\Documents\Visual Studio 2015\Projects\MyFirstDemoAddin\MyFirstDemoSPAddin\MyFirstDemoSPAddin.csproj”

The command looks like below:

generate sharepoint .app file from msbuild

Once it is generated successfully, it will give a success message like below. It will generate the .app file inside the Debug folder like below:

E:\Users\Administrator\Documents\Visual Studio 2015\Projects\MyFirstDemoSPAddin\MyFirstDemoSPAddin\bin\Debug\app.publish\

generate sharepoint .app file from visual studio

Generate SharePoint .app file from visual studio

We can also generate the SharePoint .app file from the Visual Studio itself.

Right-click on the project and then click on the Publish… button like below:

how to generate .app file for sharepoint apps using msbuild

Then in the Publish screen click on Package the add-in like below:

generate sharepoint .app file from visual studio 2017

After successfully generating the .app file it will open the folder containing the .app file.

You may like following SharePoint apps tutorials:

This tutorial, we discussed how to generate .app file for SharePoint Apps or add-ins using MSBuild and Visual Studio 2015/2017/2019.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site