TFS 2018 Release Management部署IIS相关技术问题咨询
Hey Nick, let's break down your two questions step by step— I’ve worked with TFS 2018 Release Management extensively, so I can help clarify this for you.
These two tasks serve distinct purposes, and whether you need both depends on your deployment scenario:
IIS Web App Manage: This task is all about configuring the IIS infrastructure before your app goes live. Think of it as "setting up the stage" for your web app. It handles operations like:
- Creating/deleting IIS websites and application pools
- Adjusting application pool settings (e.g., .NET Framework version, managed pipeline mode, service identity)
- Configuring site bindings (HTTP/HTTPS ports, hostnames, SSL certificates)
- Setting the website's physical path and authentication modes
IIS Web App Deploy: This task focuses solely on deploying your web application content to an existing IIS environment. It’s the "putting your app on the stage" step, with key actions including:
- Syncing your build artifacts (compiled web files) to the IIS site’s physical path
- Handling Web.config transforms and parameter replacements
- Using Web Deploy (MSDeploy) to push updates efficiently
- Restarting the site/app pool post-deployment if needed
Do you need both?
If your IIS server already has the website and app pool pre-configured manually (and you don’t need to adjust settings between releases), you might only need the
IIS Web App Deploytask.
For fully automated, consistent releases (especially on fresh servers or when you need standardized IIS settings across deployments), use both tasks in sequence: runIIS Web App Managefirst to ensure the environment is set up correctly, thenIIS Web App Deployto push your content. This eliminates manual configuration errors and keeps your pipeline reliable.
The greyed-out field means the task is linked to a release pipeline parameter (Parameters.WebsiteName) instead of allowing direct manual input. Here’s how to resolve this:
Option 1: Update the pipeline parameter directly
- Open your release definition and navigate to the Pipeline tab.
- Select the stage with the
IIS Web App Deploytask, then click the Variables button (top-right corner of the stage panel). - Locate the
WebsiteNamevariable in the list, edit its value to match your IIS website name, and save the definition. The task will now use this updated value.
Option 2: Unlink the parameter and enter manually
- Open the
IIS Web App Deploytask for editing. - Hover over the greyed-out
Website Namefield—you’ll see a small curly brace{}icon (parameter binding) next to it. - Click the icon, then select Enter a value instead of referencing
Parameters.WebsiteName. - Type your desired website name directly into the field, save the task, and you’re done.
- Open the
Note about build definition parameters: If you linked a build definition parameter to this release parameter, you’ll need to either update the build’s
WebsiteNamevalue or break the link in the release variables panel (set the release variable to a static value instead of pulling from the build).
内容的提问来源于stack exchange,提问作者Nick

