What options do we have in azure to migrate .net 4.5 console app. ?
I am looking for PaaS or Serverless options.
Can we run .net framework 4.5 console app EXEs , via Azure Function which is based on PowerShell Core ?
Please help
What options do we have in azure to migrate .net 4.5 console app. ?
I am looking for PaaS or Serverless options.
Can we run .net framework 4.5 console app EXEs , via Azure Function which is based on PowerShell Core ?
Please help
@MSTechie-7364, Apologies for the delay!
Here is a good sample for your use case - Run Console Apps on Azure Functions.
It's a generic function that can run any console application. You can specify which console app to run in a file called FunctionConfig.json.
It shows an example, you just specify the input parameters to your exe in a configuration file. You can use binary files as inputs to the exe by specifying a URL to download it from.
Azure Functions Core Tools -with this, you can test your functions on your local computer from the command prompt or terminal or also deploy to Azure.
See this doc for available PowerShell Core version and configuration details.
Azure Functions PowerShell developer guide
Kindly let us know if the above sample and configuration helps.
I'll follow-up with you and also leave this open for azure-functions community to share additional insights.
Hi @ajkuma-MSFT
I had already the code in the link - Run Console Apps on Azure Functions.
My Console app is built in .Net 4.5 .
The Azure Function runtime is 3.1 for .Net. It gave below errors
Microsoft.Azure.WebJobs.Script: One or more errors occurred. Anonymously Hosted DynamicMethods Assembly: Index was outside the bounds of the array.
2021-06-07T18:04:39.443 [Error] Function completed (Failure, Id=19151399-f9cc-4118-8137-85fd9b4f15c9, Duration=2835ms)*
Please help.
@MSTechie-7364, Thanks for sharing more details. I'm discussing on this internally with Azure Functions SMEs and we will post back soon.
I'm also adding additional tags for other community SMEs to share insights/inputs on this.
Hi,
Actually the above never worked for me.
I wrote my own code to just invoke the exe using the Process.Start method
Hello @MSTechie-7364, We did not receive any further details. Looks like a code issue. I found something similar: https://github.com/Azure/azure-functions-host/issues/1202#issuecomment-280369781
Please confirm if you are still encountering the issue.
15 people are following this question.