# Why is my packaging step failing in teambuild?

0

I'm just the build guy, I didn't write the web app and don't know much about web apps (as will become abundantly clear, I'm sure).

So dude tells me we need to run "msbuild /T:Package /P:Configuration=Release" to package his app. Okay. There's multiple solutions in his build definition and only one of them which needs the Package target so I wrote a stupid little msbuild proj file to add to his TFS build definition with a default target that looks like this:

<Target Name="Package" Condition=" '$(Configuration)' == 'Release' "> <MSBuild Projects="HisApp.csproj" Properties="Configuration=$(Configuration)"
Targets="Package" />
</Target>


Added that to the build definition and it fails with this:

Build started 8/7/2012 7:17:48 PM.
Project "C:\path\to\MyDumbScript.proj" on node 1 (default targets).
Package:
Project "C:\Path\to\MyDumbScript.proj" (1) is building "C:\Path\to\HisApp.csproj" (2) on node 1 (Package target(s)).
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(1737,5): error : Value cannot be null. [C:\Path\to\HisApp.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(1737,5): error : Parameter name: type [C:\Path\to\HisApp.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(1737,5): error : Unknown error (0x80005000) [C:\Path\to\HisApp.csproj]
Done Building Project "C:\Path\to\HisApp.csproj" (Package target(s)) -- FAILED.
Done Building Project "C:\Path\to\MyDumbScript.proj" (default targets) -- FAILED.

Build FAILED.

"C:\Path\to\MyDumbScript.proj" (default target) (1) ->
"C:\Path\to\HisApp.csproj" (Package target) (2) ->
(GetProjectWebProperties target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(1737,5): error : Value cannot be null. [C:\Path\to\HisApp.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(1737,5): error : Parameter name: type [C:\Path\to\HisApp.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(1737,5): error : Unknown error (0x80005000) [C:\Path\to\HisApp.csproj]

0 Warning(s)
2 Error(s)

Time Elapsed 00:00:00.82


So that's as clear as mud.

Questions:

1. Is there some more straightforward way to call the package target from Team Build when the build definition calls multiple solutions?

2. Why's this failing?

Thanks.

msbuild
tfsbuild
packaging
asked on Stack Overflow Aug 8, 2012 by Jeff Youngstrom • edited Dec 29, 2016 by jessehouwing

## 1 Answer

0

It looks like the errors were due to IIS not being enabled on the build machine.

When I enabled the “Web Management Tools” and “World Wide Web Services” features on the build machine the build failed in new and more interesting (and less opaque) ways.

As for the question of how better to call the package target from Team Build, I'd be happy to hear answers, but this works now.

answered on Stack Overflow Aug 8, 2012 by Jeff Youngstrom

User contributions licensed under CC BY-SA 3.0