In this post, we will discuss how we can generate the .app file using MSBuild as well as from visual studio 2015. You can use visual studio 2015 to develop the SharePoint hosted app.
Generate .app file using MSBuild:
After developing the .app file, open 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:
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\220.127.116.11
Generate .app file from visual studio 2015:
Right click on the project and then click on Publish… button like below:
Then in the Publish screen click on Package the add-in like below:
After successfully generating the .app file it will open the folder containing the .app file.
Hope this will be helpful.
You May Also like the Following SharePoint Tutorials: