I am working on automating our process of building an Azure-deployable package, and need to understand why Publish and Package behave differently in an unexpected way.
Manually, in Visual Studio 2013, I can create an Azure-deployable package by selecting the project, right-clicking it and selecting Package... from the popup menu and then clicking OK. This builds a c.150MB cspkg file as expected.
I thought that I could replace this an MSBuild command along these lines:
MSBuild project.ccproj /p:Configuration=Release /p:TargetProfile=Cloud /t:Package /v:diag
but this fails with an error about copying a DLL.
If I change Package to Publish:
MSBuild project.ccproj /p:Configuration=Release /p:TargetProfile=Cloud /t:Publish /v:diag
then it succeeds building the package, but builds a c.75MB cspkg file.
I guess my basic question is what is the difference in behavior caused by? And am I doing this right?