PhilG
PhilG

Reputation: 99

Deploy with New-AzureWebsiteJob and dotnet core?

I have an azure webjob that I can deploy fine through visual studio, right click publish etc. all that is fine. I am using Microsoft.Azure.Webjobs beta 3.0 against .NET Core 2.0. Of course when that project is built it creates a set of .dlls and no direct executable as is normal for .net core.

Now I want to create an integration test suite which will deploy my webjob to azure with Powershell, using New-AzureWebsiteJob. When I publish this way I get

New-AzureWebsiteJob : No runnable script file was found.

As far as I can gather my job file should have either: batch (.exe/.cmd/.bat), bash (.sh), javascript (.js as node.js), php (.php) or python (.py). If so what magic does VS do, and how should I go about scripting this?

Upvotes: 1

Views: 589

Answers (1)

PhilG
PhilG

Reputation: 99

Ok, found the solution. It is, however, inelegant. Create a file run.bat or similar containing

@ECHO OFF
dotnet YourLibraryName.dll 

and include that in any zip file uploading with the cmdlet. More here

Upvotes: 2

Related Questions