jenkinsmsbuildvisual-studio-2013orchardcms-1.8

MSBuild not copying files with PublishProfile


I have a Visual Studio 2013 solution with the full Orchard source code. When I use "Publish..." on the "Orchard.Web" project in Visual Studio, it correctly publishes the site to the File System destination I've configured into the .PubXml file that I used.

However, if I build this site using Jenkins, the files do not get copied to the destination. I've created a separate PubXml file that is used by Jenkins.

In my Jenkins job, I have two Build steps of interest. The first uses the src\Orchard.sln file with a command line argument of /p:Configuration=Release. This runs correctly, and builds the entire solution.

The second Build step, immediately after, uses the Build File of src\Orchard.Web\Orchard.Web.csproj and these command line arguments:

With this, the build and deploy seems to work - but doesn't. Here are some lines from the build output:

Copying all files to temporary location below for package/publish:
obj\Release\Package\PackageTmp.
Auto ConnectionString Transformed obj\Release\Package\PackageTmp\Shapes\Scripts\Web.config into obj\Release\CSAutoParameterize\transformed\Shapes\Scripts\Web.config.
(... about 200 more "Auto ConnectionString..." lines...)
Finished: SUCCESS

No where does it actually copy the files to the destination defined in the PUBXML file.

In contrast, in Visual Studio, the output looks similar, but transforms only 4 config files and includes lots of "Publishing folder x" lines:

(...)
Transformed Modules\SH.GoogleAnalytics\web.config using ....
Copying all files to temporary location below for package/publish:
obj\Release\Package\PackageTmp.
Publishing folder /...
Publishing folder bin...
(etc.)

(I have installed the latest Windows Azure SDK for .NET on the Jenkins server.)


Solution

  • I have the same trouble,that work for me:

    /t:Rebuild
    /p:DeployOnBuild=true
    /p:PublishProfile=Jenkins_Publish
    /p:Configuration=Release
    

    do not use /p:VisualStudioVersion=xxx