How can i create app package for SharePoint 2013 App Catalog by using MSBuild?
-
Monday, August 13, 2012 9:45 AM
Hi!
I know that I can create an app package in VisualStudio 2012 RC simply by right clicking on App Project and then clicking "Publish". But how I can do the same with MSBuild?
All Replies
-
Monday, August 13, 2012 8:33 PM
Hi Dmitriv,
You can use the following command to get the packages for publishing:
msbuild /t:Package <ProjectFileName>
The packages will be generated into the same location as you use "Publish" through VS IDE. It works perfectly for SharePoint-hosted and autohosted apps. The MSBuild currently doesn't support to set parameters for hosting web site, Client ID and Client Secret for provider-hosted apps though.
Thanks,
Xiaoying GuoXiaoying is a program manager in Microsoft Visual Studio SharePoint Developer Tools team | This post is provided "as-if"
- Proposed As Answer by Yina ArenasMicrosoft Employee, Moderator Tuesday, August 14, 2012 1:35 AM
- Marked As Answer by Dmitriy Inozemtsev Tuesday, August 14, 2012 8:31 AM
-
Friday, November 02, 2012 12:01 AM
Hello,
I add this as a post-build step:
msbuild /t:Package "$(ProjectName)"
But I get this error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4264, 5): error MSB3073: The command "msbuild /t:Package "XXX.SharePoint.AdvancedAnalytics"" exited with code 9009.
Project src\SPXXXFeature\AdvancedAnalytics\XXX.SharePoint.AdvancedAnalytics.csproj failed.
Project src\FeatureInstaller\CodePlex.SharePointInstaller\CodePlex.SharePointInstaller2013.csproj failed.
Project src\SharePoint2013.sln failed.Any ideas please?
-Dave
-
Friday, November 09, 2012 9:34 AM
Hi Xiaoying, are you able to help me with the following question please:
Does MSBuild 2010 /t:Package switch package an existing SharePoint WebPart or build it first?
In other words can I do the following:
- MSBuild /p:Configuration=Release /m MyWebPart.csproj
- Then do something else like ILMerge and sign
- MSBuild /p:Configuration=Release /m MyWebPart.csproj /t:Package
To package the ILMerged and signed Webpart to a WSP?
Thanks
-
Friday, November 16, 2012 3:33 PM
Hi.
Using a VS2012 developer command prompt, I am getting:
>msbuild /t:Package MyProject.csproj
CreateSandboxedReferenceAssembly:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\ildasm.exe" /nobar /
out="C:\Users\xxx\AppData\Local\Temp\Microsoft.SharePoint.il" "UserCode\a
ssemblies\Microsoft.SharePoint.dll"
EXEC : error : File 'UserCode\assemblies\Microsoft.SharePoint.dll' not found or
not a PE file [C:\MyProject\MyProject.csproj]
C:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.targets\ImportAfter\Microso
ft.VisualStudio.SharePoint.SandboxedCompilation.targets(39,5): error MSB3073: T
he command ""C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\ildasm.exe
" /nobar /out="C:\Users\xxx\AppData\Local\Temp\Microsoft.SharePoint.il" "Us
erCode\assemblies\Microsoft.SharePoint.dll"" exited with code 1. [C:\MyProject\MyProject.csproj]
Done Building Project "C:\MyProject\MyProject.csproj" (Package targe
t(s)) -- FAILED.Not sure where to look. Also, is there any update on providing the wizard items like ClientID and Secret with msbuild?
- Edited by Dan Jarvis Friday, November 16, 2012 4:09 PM

