Testing and developing Google Cloud Functions via the Cloud Console is tedious, as the function has to be redeployed after every change to the code.
for local development of Google Cloud Functions is somewhat simplistic and difficult to follow in places. Therefore here are my instructions for C#
dotnet new --install Google.Cloud.Functions.Templates
dotnet new gcf-http
The project gets the name of the parent folder
Local with Functions Framework
Local with Docker / Cloud Native Buildpacks
Create Docker image:
pack build --builder gcr.io/buildpacks/builder:v1 --env GOOGLE_RUNTIME=dotnet --env GOOGLE_FUNCTION_SIGNATURE_TYPE=http --env GOOGLE_FUNCTION_TARGET=TestGcpLocalCloudFunction01.Function test-gpc-local-function-01
TestGcpLocalCloudFunction01 is the name of the project / namespace in C#. Function is the name of the class.
It is essential to note that the name of the image test-gpc-local-function-01 is lowercase.