Domanda

When I run the following msbuild command:

msbuild /t:Package /p:Configuration=Release;PackageLocation={MY PACKAGE LOCATION}

My package is created correctly and the contents of my SetParameters file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<parameters>
  <setParameter name="IIS Web Application Name" value="Default Web Site/SiteNameIWant" />
</parameters>

"SiteNameIWant" comes directly from my web application project file:

<DeployIisAppPath>Default Web Site/SiteNameIWant</DeployIisAppPath>

I have my web application project file configured this way for both the Debug and Release configurations.

When I run my build via TeamCity, however, my site name comes out as "SiteNameIWant.csproj_deploy". I have found a workaround by explicitly adding a build parameter:

system.DeployIisAppPath=Default Web Site/SiteNameIWant

However, I'm not satisfied with this solution because TeamCity is ignoring the value (set per configuration) in my web application project.

How do I get TeamCity to respect my web application project file's setting?

È stato utile?

Soluzione

It's always something obvious, isn't it? Not surprisingly, the problem was with me, not TeamCity. :D

I realized what was happening was that the change that I had applied to my web application project file for the DeployIisAppPath setting was not committed to source control. So, running msbuild locally worked but TeamCity was still getting the old value that had not yet been updated in source control. Doh!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top