question

ChrisRendall-7029 avatar image
0 Votes"
ChrisRendall-7029 asked ChrisRendall-7029 edited

Visual Studio 2019 can't publish to IIS

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?

windows-server-iis
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ChrisRendall-7029 avatar image
0 Votes"
ChrisRendall-7029 answered ChrisRendall-7029 edited

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!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SamWu-MSFT avatar image
0 Votes"
SamWu-MSFT answered ChrisRendall-7029 converted comment to answer

Hi @ChrisRendall-7029

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.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have the ASP.NET and web development workload selected in the Visual Studio Installer, but when I go to Publish my application I get a dialog back that it's not installed. The URL takes me a to a website to download software for an older version of Visual Studio.

84502-vs.jpg


0 Votes 0 ·
vs.jpg (13.7 KiB)

@ChrisRendall-7029 Did you try to download and install it? I think it might be a problem with Visual Studio, you could consider repairing your Visual Studio. 1. In Control Panel, on the Programs and Features page, choose the product edition that you want to repair, and then choose Uninstall/Change. 2. In the Setup wizard, choose Repair, choose Next, and then follow the remaining instructions.

0 Votes 0 ·