serverless-reference-implementation
serverless-reference-implementation copied to clipboard
Issues with publishing DroneStatusFunctionApp
This is what happens when I try to publish the DroneStatusFunctionApp on OSX:
cd DroneStatus/dotnet/DroneStatusFunctionApp/
func azure functionapp publish ${DRONE_STATUS_FUNCTION_APP_NAME}
cd ../../..
Can't determine project language from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell, --custom]
Your Azure Function App has 'FUNCTIONS_WORKER_RUNTIME' set to 'dotnetIsolated' while your local project is set to 'None'.
You can pass --force to update your Azure app with 'None' as a 'FUNCTIONS_WORKER_RUNTIME'
I tried this:
cd DroneStatus/dotnet/DroneStatusFunctionApp/
func azure functionapp publish ${DRONE_STATUS_FUNCTION_APP_NAME} --csharp --force
cd ../../..
Setting 'FUNCTIONS_WORKER_RUNTIME' to 'dotnet' because --force was passed
Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
/usr/local/share/dotnet/sdk/6.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/Users/nsowatsk/Dropbox/git/serverless-reference-implementation/src/DroneStatus/dotnet/DroneStatusFunctionApp/DroneStatusFunctionApp.csproj]
Build FAILED.
/usr/local/share/dotnet/sdk/6.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/Users/nsowatsk/Dropbox/git/serverless-reference-implementation/src/DroneStatus/dotnet/DroneStatusFunctionApp/DroneStatusFunctionApp.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.27
Error building project
After upgrading .NET to v8 from here:
https://www.microsoft.com/net/download
This worked:
cd DroneStatus/dotnet/DroneStatusFunctionApp/
func azure functionapp publish ${DRONE_STATUS_FUNCTION_APP_NAME} --csharp --force
cd ../../..
Setting 'FUNCTIONS_WORKER_RUNTIME' to 'dotnet' because --force was passed
Welcome to .NET 8.0!
---------------------
SDK Version: 8.0.204
Telemetry
---------
...
----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate, run 'dotnet dev-certs https --trust'
Learn about HTTPS: https://aka.ms/dotnet-https
...
--------------------------------------------------------------------------------------
An issue was encountered verifying workloads. For more information, run "dotnet workload update".
...
Build succeeded.
...
10 Warning(s)
0 Error(s)
Time Elapsed 00:00:24.35
Getting site publishing info...
[2024-04-21T09:52:36.961Z] Starting the function app deployment...
Creating archive for current directory...
Uploading 13.66 MB [##############################################################################]
Upload completed successfully.
Deployment completed successfully.
[2024-04-21T09:53:07.553Z] Syncing triggers...
Functions in schtapkbciexmwpu22k-dronestatus:
I am not sure that this does work, as the function is not appearing under "Functions" in the Function App itself. See attached.
Apologies for any inconvenience. Kindly try the following command:
func azure functionapp publish ${DRONE_TELEMETRY_FUNCTION_APP_NAME} --dotnet-isolated
I got the funtion deployed.
@NathanDotTo - Thanks for your feedback. The latest update should address your issue.