Search code examples
.netazuremacosiis

Publish To IIS on Azure Windows VM from MacOS


Currently, I have a .NET application that I can publish locally on a Mac machine and FTP to IIS hosted on an Azure VM.

Is there an automated way to do the publish?

I've come across instructions for WebDeploy however it seems like WebDeploy won't work when publishing from a Mac.

Edit:

So I would like to:

  • publish the .NET application
  • deploy it to the IIS hosted on Azure VM from Mac OS without manually transferring the published files

Solution

  • Unlike the features available in Visual Studio on Windows, there doesn't seem to be a convenient way to publish a ASP.NET app directly from the IDE.

    For MacOS, Visual Studio is being retired this year.

    I have found that there are no plugins available for Visual Studio on MacOS that will publish an app to IIS running on a Windows VM. This seems to be a limitation in that such plugins on Windows would use WebDeploy to deploy the app. WebDeploy is not available on MacOS.

    So right now, the steps to publish the app from MacOS are:

    1. Publish you app via dotnet publish
    2. FTP your publish folder to your Windows VM under the IIS wwwroot folder