azure-functions

Compiling Azure Function v1 (.NET Framework) gives FileNotFoundException for Microsoft.Azure.WebJobs

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-11 09:40:19
问题 I have an Azure Functions v1 project (ala .NET Framework) in Visual Studio 2017. It would build / compile just fine for a long time, now it's giving the following FileNotFoundException complaining it can't find 'Microsoft.Azure.WebJobs' v2.2. The thing it this project was building just fine, then all of a sudden this error is occurring. In the past I would close Visual Studio, then reopen it and the build would work. Or even if you Clean the solution, the build would then work. The problem is

Compiling Azure Function v1 (.NET Framework) gives FileNotFoundException for Microsoft.Azure.WebJobs

情到浓时终转凉″ 提交于 2021-02-11 09:40:01
问题 I have an Azure Functions v1 project (ala .NET Framework) in Visual Studio 2017. It would build / compile just fine for a long time, now it's giving the following FileNotFoundException complaining it can't find 'Microsoft.Azure.WebJobs' v2.2. The thing it this project was building just fine, then all of a sudden this error is occurring. In the past I would close Visual Studio, then reopen it and the build would work. Or even if you Clean the solution, the build would then work. The problem is

Azure-Web-sites: How to cancel a deployment?

半腔热情 提交于 2021-02-11 07:56:12
问题 I have an Azure Function App / Azure Website setup with continuous deployment from source-control. This App has a custom deployment script that takes quite a bit of time to run. Occasionally I push out a change to git which was a mistake, and I want to cancel that one deployment (While still allowing future git pushes to cause a deployment). Is there a PowerShell command I can run, or some option which will cancel my current deployment? 回答1: I was able to figure this out eventually, and

Failed to load native library grpc_csharp_ext.x86.dll while running Azure Function in Visual Studio

一笑奈何 提交于 2021-02-10 20:18:34
问题 lately I have encountered a following problem. Azure Function that is run in Visual Studio always throws an exception: System.IO.IOException HResult=0x80131620 Message=Error loading native library "C:\Users\\AppData\Local\AzureFunctionsTools\Releases\2.16.0\cli\grpc_csharp_ext.x86.dll" Source=Grpc.Core StackTrace: at Grpc.Core.Internal.UnmanagedLibrary..ctor(String[] libraryPathAlternatives) at Grpc.Core.Internal.NativeExtension.LoadUnmanagedLibrary() at Grpc.Core.Internal.NativeExtension

Environment.SetEnvironmentVariable in Azure Function

≯℡__Kan透↙ 提交于 2021-02-10 20:15:51
问题 How bad it is to use Environment.SetEnvironmentVariable in Azure Functions? Based on my initial observation it seems it is working as expected (ie. storing the value and returning when I asked using Environment.GetEnvironmentVariable call) but not showing anywhere in the environment variables list when I open the function in Kudu explorer. Where it is setting, is it okay to use or any adverse effects of using it? In my case, I have to get the user details using the token passed to Function

Environment.SetEnvironmentVariable in Azure Function

天涯浪子 提交于 2021-02-10 20:06:24
问题 How bad it is to use Environment.SetEnvironmentVariable in Azure Functions? Based on my initial observation it seems it is working as expected (ie. storing the value and returning when I asked using Environment.GetEnvironmentVariable call) but not showing anywhere in the environment variables list when I open the function in Kudu explorer. Where it is setting, is it okay to use or any adverse effects of using it? In my case, I have to get the user details using the token passed to Function

Is there a way to have an Azure Function App created from multiple .NET projects and have all of the Functions from all of them?

房东的猫 提交于 2021-02-10 18:55:58
问题 We have an Azure Function App that has multiple Functions, and was created using .NET project (Name: Project1). We want to add a new Azure function from a different .NET project (Name: Project2) to the existing Azure Function App without overwriting the existing functions that were deployed from Project1. Currently when we deploy Azure Function from Project2 the functions from Project1 gets removed, the Function App contains only the Project2 functions. We deploy the function using the Azure

Is there a way to have an Azure Function App created from multiple .NET projects and have all of the Functions from all of them?

▼魔方 西西 提交于 2021-02-10 18:54:30
问题 We have an Azure Function App that has multiple Functions, and was created using .NET project (Name: Project1). We want to add a new Azure function from a different .NET project (Name: Project2) to the existing Azure Function App without overwriting the existing functions that were deployed from Project1. Currently when we deploy Azure Function from Project2 the functions from Project1 gets removed, the Function App contains only the Project2 functions. We deploy the function using the Azure

How to include non-python reference files in Azure Function?

*爱你&永不变心* 提交于 2021-02-10 18:20:39
问题 I have some Python code that references external .ttf font files. I can reference them by including them in the project root folder. I'd like to turn this code into an HTTP Triggered Azure Function. I see in the docs that I can import external Python modules and files into a Function, but what about non-Python files? How are these referenced? When Python code is run locally, they are referenced in the code as: h1_font = ImageFont.truetype("DejaVuSans-Bold.ttf", h1_size) h2_font = ImageFont

How to get the hostname for where the azure function run from timer trigger?

六月ゝ 毕业季﹏ 提交于 2021-02-10 14:36:33
问题 I have a timertrigger [FunctionName("HeathChecker")] public static void Run([TimerTrigger("*/10 * * * * *")]TimerInfo myTimer, ILogger log) { log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}"); } And an HTTP trigger [FunctionName("AspNetCoreHost")] public Task<IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, Route = "{*all}")]HttpRequest req, [AspNetCoreRunner(Startup = typeof(Startup))] IAspNetCoreRunner aspNetCoreRunner, ExecutionContext