TFS 2012 Build Definition for web deployment ignores parameters defined in
project files
I'm trying to set up a TFS 2012 build definition that will build a
solution and deploy several web apps within the solution. I came across
this article that seems to address exactly what I'm trying to do and also
seems to agree with the solution mentioned here.
So I tried implementing the build definition as described in that article,
but no matter what I do, it seems to be ignoring the parameters I put in
the specific configuration property group of the csproj files which look
like this:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'MyConfig|AnyCPU' ">
...
<DeployIisAppPath>My Website Name</DeployIisAppPath>
<MsDeployServiceUrl>MyWebServer</MsDeployServiceUrl>
</PropertyGroup>
I get the following error for each project I'm trying to deploy:
Web Deploy publish/package validating error: Missing or Invalid property
value for $(MsDeployServiceUrl)
So I tried defining the MsDeployServiceUrl in the MSBuild Arguments of the
build definition instead of in the csproj files. This solved the above
error, but then I get this error:
The "ConcatFullServiceUrlWithSiteName" task was not given a value for the
required parameter "SiteAppName".
So its not reading the DeployIisAppPath parameter from the csproj file
either, and I can't move that to the MSBuild Arguments line because its
different for each project I'm trying to deploy.
Its almost as if the deployment process is unaware of which configuration
I'm building, so it can't find the correct PropertyGroup in the csproj
files to read the paramters from. However, I have specified the
configuration in the "Configurations to Build" line of the build
definition, and I've also tried adding /p:Configuration=MyConfig to the
MSBuild Arguments line, and that doesn't seem to solve the problem.
No comments:
Post a Comment