Visual Studio 2019 can't publish to IIS

Chris Rendall 116 Reputation points
2021-04-02T15:22:28.463+00:00

I'm running Visual Studio 2019 16.9.3. For several years I've been able to go to the Build menu and select Publish to deploy my ASP.NET application to an IIS Server running Windows Server 2019. Now it either gives me an error that the web publishing extension is not installed, or it brings me to a dialog box to configure the publish settings. I've tried using the Web Server (IIS) option to configure the publish options and when I click Finish it spins for a split second and then comes back to the wizard where I filled in the settings. I've also tried Import Profile, but after I browse and select the .PublishSettings file and click Finish it says 'Waiting...' for a split second and the dialog box doesn't close.

I've tried removing the ASP.NET and web development workload and then adding it back in, but that didn't help.

What do I need to do to fix the web publishing to IIS?

Internet Information Services
{count} votes

Accepted answer
  1. Chris Rendall 116 Reputation points
    2021-04-06T21:00:25.757+00:00

    In the Control Panel when I click the Uninstall/Change button for Visual Studio 2019 it brings up the Visual Studio Installer. In the Visual Studio Installer there is a button labeled 'More' that has a Repair option. I selected that and it re-installed Visual Studio and that fixed the Publish functionality for me.

    Thanks!

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Sam Wu-MSFT 7,036 Reputation points Microsoft Vendor
    2021-04-05T07:16:14.26+00:00

    Hi @Chris Rendall

    Run the "Microsoft visual studio installer" click modify on the 2019 instance you have installed. Then check the workloads you have installed to see if the project types you are using are all present. Presumably you would want asp.net and web tools.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.