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

0

1 Answer 1

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!

4
  • 1
    thanks for taking the time out to respond to your own question. It's helped me out for one! :) Nov 25, 2013 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: stackoverflow.com/a/35315594/11635 Feb 10, 2016 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 Weband WebApplications from C:\Program Files (x86)\Microsoft Visual Studio\2017\<YourEditionHere>\MSBuild\Microsoft\VisualStudio\v15.0 even though you install WebDeploy componenten during setup.
    – Tobias
    Mar 7, 2017 at 6: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. May 24, 2017 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.