I'm setting up some DevOps for my site, and so far I've used the following command for deployment on two ASP.NET Core apps, with success:
dotnet publish ProjectName.csproj /p:PublishProfile="PublishProfileName" /p:Password=password
I've just created an Azure Function, using the V2 runtime and .NET Core 2.1, as suggested for all new projects (see here https://azure.microsoft.com/en-us/blog/introducing-azure-functions-2-0/), but if I use the same command, I find that it only publishes it to a local folder and doesn't seem to deploy the project to Azure.
If I use the MSBuild equivalent, it seems to also miss out the deployment stage.
I'm guessing its to do with the project type in some way not having the appropriate build targets, but I'm not sure how to track this further.
I can download the publish settings from Azure, import them into Visual studio and publish through VS, so it seems like if the VS path works, this might be a regression or bug in the tooling somewhere, rather than something unsupported?
I'm using:
- Visual Studio 15.8.8 +28010.2048
- Azure Functions and Web Jobs Tools 15.9.02046.0
If I shouldn't be using dotnet publish with Azure functions, what should I be using instead for command line CD? I've seen references to the Azure Function CLI tools, but I'd prefer not to have to install a package manager on our build agents if it can be done through other tooling.