Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with publishing DroneStatusFunctionApp #142

Open
NathanDotTo opened this issue Apr 21, 2024 · 3 comments
Open

Issues with publishing DroneStatusFunctionApp #142

NathanDotTo opened this issue Apr 21, 2024 · 3 comments

Comments

@NathanDotTo
Copy link

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'
@NathanDotTo
Copy link
Author

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

@NathanDotTo
Copy link
Author

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:

@NathanDotTo
Copy link
Author

I am not sure that this does work, as the function is not appearing under "Functions" in the Function App itself. See attached.

Screenshot 2024-04-21 at 19 49 59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant