9

I have successfully set up an MSBuild script that when run locally builds and packages up my site and places the package in the desired folder. However when running it on Server 2008 the build will run without errors but it never creates the package.

I have compared the logs from the 2 machines and they start similarly, my local machine references the package request..

ValidateGlobalPackageSetting:
$(PackageAsSingleFile) is True
$(PackageFileName) is C:\GIT\BamBamV2\output\package\BamBamV2.zip. Validating...

... and then goes on to move a whole load of stuff about.

On the build server none of this is mentioned and it just completes the build without errors or warnings.

I am wondering if its something to do with the way I am calling the packaging in my build script

<Target Name="CompileSolution" >
    <MSBuild Projects="$(SourceFolder)\$(ProjectName).sln" Properties="Configuration=$(Configuration);OutDir=$(ProjectBuildDirectory);DeployOnBuild=true;DeployTarget=Package;PackageLocation=$(PackagePath)">
</MSBuild>

As you can see I am passing in the whole solution rather than a specific project so perhaps this has something to do with it.

Sam : )

samaspin
  • 2,342
  • 1
  • 26
  • 31

1 Answers1

15

Found a similar problem here although in their case they were lucky enough to get an error message in my case the packaging steps were being skipped with no error or warning messages

Taking the last step in the suggested solution fixed the issue for me which was...

From the C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0 folder on your dev machine copy the "Web" and "Web Applications" folders to the equivalent directory on your build server.

This fixed my problem!

Community
  • 1
  • 1
samaspin
  • 2,342
  • 1
  • 26
  • 31
  • 1
    thanks for taking the time out to respond to your own question. It's helped me out for one! :) – Quibblesome Nov 25 '13 at 19:15
  • This answer saved a lot of cussing :) ... also next thing down the track for me was AspNetMerge missing - I was able to work around having to install the SDK and be done with this whole mess by turning off precompilation: http://stackoverflow.com/a/35315594/11635 – Ruben Bartelink Feb 10 '16 at 12:48
  • The problem is still there on VS2017 RC. If you want to install it with a minimal footprint on a build machine you need to copy the folders `Web`and `WebApplications` from `C:\Program Files (x86)\Microsoft Visual Studio\2017\\MSBuild\Microsoft\VisualStudio\v15.0` even though you install WebDeploy componenten during setup. – Tobias Mar 07 '17 at 06:13
  • Just to add to the problem, I faced the same problem in my build machine with nothing but Microsoft Build Tools 2015 and it's pre-reqs. It already had the Web Applications folder. Copying the Web folder solved it. – Gabriel Rainha May 24 '17 at 18:09