Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

  • /p:DeployOnBuild=true
  • /p:PublishProfile="D:\workspace\Site\trunk\src\Orchard.Web\Properties\PublishProfiles\Jenkins.pubxml"
  • /p:VisualStudioVersion=12.0
  • /p:Configuration=Release
  • /p:Platform=AnyCPU
  • /v:minimal
  • /nologo
  • /p:WarningLevel=1

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.)

like image 750
Glen Little Avatar asked Jul 23 '14 16:07

Glen Little


1 Answers

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

like image 187
dennis.liu Avatar answered Oct 15 '22 17:10

dennis.liu