I'm trying to utilise TFS Team Build to deploy web applications from a solution as part of the build process, however I'm having a problem with the IIS website name when using package .zip and cmd files.

In the web application project settings "Package/Publish Web" tab I can set the IIS website name (eg "mobile") and when the project is built using the MSBuild action from the workflow the resulting .zip and .xml files are created correctly. However, upon opening the SetParamters.xml file, the IIS Web Application Name parameter has an old value, something like "Default website/mobile\_deploy".

If I build a package directly from within Visual Studio 2010 the SetParameters.xml has the IIS Web Application Name I set in the project file settings.

The build template is set to clear the workspace on each build and I've confirmed this by watching the binaries folder being cleared on the build agent during the build so I'm certain its not the value hasn't been overwritten.

Any suggestions to get the project's IIS Web Application Name pulled through properly?
['https://Stackoverflow.com/questions/9923265', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/329666/']
Maybe, when you build your project through `MSBuild` you don't set the same `Configuration` in which you have changed the `IIS Web Site/application name` through `Package/Publish Web` settings on Visual Studio 2010.
The deploy path can be different for each Project Configuration. Perhaps you set the Debug value while TFS is using Release?