Tag

azure-functions

AzureFunctions

Azure Functions in C# quick FAQs and tips

I get pinged once a while about something that doesn’t behave properly in Azure Functions, or about a general question about Azure Functions. I usually direct the developers to the right places. But I figured it would be a great idea to put all the answers I give in a post for future reference. Questions I use ILogger<T>, but it is not logging to the console when I deployed to Azure Bret Samblanet answers this well in a GitHub thread: This is another subtlety about how that console/debug log works in the portal. It only displays log messages if it knows they come from this function — which means they match the category Function.{FunctionName}.Class. The vanilla ILogger we pass in…

Read more
AzureFunctions, Personal

Introducting Azure Functions Slack binding

I am proud to announce the first version of my Slack Azure WebJobs Extension. The binding extension eases out the integration with Slack for sending messages. It also includes an easy way to create rich messages using Slack’s Block Kit. The blocks and its related elements also have implement validation to adhere to Slack’s API validation rules. This helps to have a first level validation before sending the requests to Slack and get a response of type 400: invalid_blocks. You can find the extension here. So for the ones who care a little bit more, here’s a of bit of context as to why I spent some time creating the binding extension. I was looking for an easy way to…

Read more
Azure, C#, Visual Studio

The moment I came to play with .NET Standard 2.0 – Azure Functions

A lot has changed ever since I played with Azure Functions and .NET Standard 2.0. If you remember from my previous post, I was talking about how you had to set the FUNCTIONS_EXTENSION_VERSION to beta in order to benefit from the new runtime. I also talked about how I had a problem with the connection manager to access the app settings. Well the good news is that the team now fully migrated to the new Configuration modeling from ASP.NET core. You can now easily refer to your configurations by importing the following packages and using the following code to have access to your configuration: Nuget package Description Microsoft.Extensions.Logging Main logging package Microsoft.Extensions.Logging.Abstractions Makes SetBasePath() available Microsoft.Extensions.Logging.Json Makes AddJsonFile() method available…

Read more
Azure, C#

The moment I came to play with .NET Standard 2.0 part 2!

So I’ve been on a mission to get all my pieces from my last post to work. While configuring my Continuous Integration (CI) pipeline for my bot, I’ve came across an error that made my CI build fail:

What? My project compiles fine on my computer and I thought that .NET Framework 4.7.1 had built-in support for .NET Standard 2.0. Well according to this GitHub issue something ain’t quite right yet. Adding the reference <Reference Include=”netstandard” /> directly into the csproj fixes the issue (thanks techaimail!) Azure Functions 2 Azure functions 2 (using the .NET Standard 2 framework) is still in preview (beta). So when you deploy your function through your CI/CD pipeline, make sure to go in the Application…

Read more
Azure, C#

The moment I came to play with .NET Standard 2.0…

I’ve been playing around with Azure Functions, the Bot Framework and the .NET Standard 2.0 framework recently and I’ve come across some quite interesting challenges that I want to share with you. I’ve been developing a system that has the following layout: As you can see, I have an Azure Function (Time Trigger) that pushes data to an Azure SQL database. I have an ASP.NET Core Web API (targeting the .NET Core 2.0 framework) that is the data abstraction for anything that wants to consume my data. Right now, only the Bot (Bot Framework) is the client. To have a functional and reusable ecosystem, I created some libraries to interact with my system which includes the Data Access Layer (DAL), …

Read more