I have been having some issues getting a lightswitch app to publish to a package outside of visual studio.
I think I am probably using the wrong command, but I cant find any information about what commands I should use.
My command looks like this:
MSBuild "Path To My Sln.sln" /p:VisualStudioVersion=12.0;DeployOnBuild=true;PublishProfile=Release;Configuration=Release
I get the following error:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web
.Publishing.targets(3899,5): msdeploy error ERROR_EXCEPTION_WHILE_CREATING_OBJECT:
Web deployment task failed. (Object of type 'manifest' and path
'manifestpath\projectname.xml' cannot be created. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)
The reason for this is that the app.publish folder that is within the manifest file does not exist. The folder should be located in the bin.
When I do a publish via VS the app.publish folder is created, so my current thinking is that VS does something that the command I am running does not, I am not sure what that is though.
The reason for needing this to work via the command line is so that we can create a package on our build server.
In theory, you should be able to target the
Publish
target of the.lsxtproj
root project of the three lightswitch projects. This will trigger a build of all dependencies and then push the Server and HtmlClient project outputs into a package in thePublish\
folder where the.lsxtproj
is.The
DeployOnBuild
property is exposed by the standard web project targets file to trigger a package creation, but it would seem that this just doesn't apply to LightSwitch projects, which I suppose makes sense given how much Voodootm is doing when it builds. So you'll need to remove that.If you were creating another project file to act as your build script, then, you'd do something like: