NL.Serverless.AspNetCore.AzureFunctionsHost
3.0.7.1
See the version list below for details.
dotnet add package NL.Serverless.AspNetCore.AzureFunctionsHost --version 3.0.7.1
NuGet\Install-Package NL.Serverless.AspNetCore.AzureFunctionsHost -Version 3.0.7.1
<PackageReference Include="NL.Serverless.AspNetCore.AzureFunctionsHost" Version="3.0.7.1" />
paket add NL.Serverless.AspNetCore.AzureFunctionsHost --version 3.0.7.1
#r "nuget: NL.Serverless.AspNetCore.AzureFunctionsHost, 3.0.7.1"
// Install NL.Serverless.AspNetCore.AzureFunctionsHost as a Cake Addin #addin nuget:?package=NL.Serverless.AspNetCore.AzureFunctionsHost&version=3.0.7.1 // Install NL.Serverless.AspNetCore.AzureFunctionsHost as a Cake Tool #tool nuget:?package=NL.Serverless.AspNetCore.AzureFunctionsHost&version=3.0.7.1
NL.Serverless.AspNetCore
This repo provides code for hosting an AspNet Core App inside an Azure Function V3 HTTP Trigger without the use of TestServer.
I combined the solution of <a href="https://github.com/NicklausBrain">NicklausBrain</a> (original repo can be found <a href="https://github.com/NicklausBrain/serverless-core-api">here</a>) with the <a href="https://docs.microsoft.com/en-US/azure/azure-functions/functions-dotnet-dependency-injection">DI support for azure functions</a>. This provides a way to avoid initalizing the AspNet Core App with every incoming request.
Prerequisites
- .Net Core SDK >= 3.1.100
- Azure Function Core Tools v3
npm install -g azure-function-core-tools@3
Instructions
- Install the project template for dotnet and create a new project.
dotnet new --install NL.Serverless.AspNetCore.Template
dotnet new serverless-aspnetcore -n Your.New.ProjectName
- Happy coding your AspNet Core WebApp.
- Run the Azure Function hosting the web app
func host start -build
Samples
Host the ASP.NET Boilerplate sample in an Azure Function
Credits
Most of the code is copy pasta from this repo: https://github.com/NicklausBrain/serverless-core-api
Thanks <a href="https://github.com/NicklausBrain">NicklausBrain</a>.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Microsoft.ApplicationInsights (>= 2.13.1)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 3.1.2)
- Microsoft.Azure.Functions.Extensions (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.